Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / computed-image-width-with-percent-height-quirksmode.html
blob980db4cee92bc6fb11ea31a6798f890248663ca6
1 <!DOCTYPE>
2 <html>
3 <head>
4 <!-- https://bugs.webkit.org/show_bug.cgi?id=28035 -->
5 <!-- In quirks mode, an image with height set to 100% should expand to fill the height of the body of the document. -->
6 <style>
7 img { height:100%; }
8 </style>
9 <script type="text/javascript">
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
15 function run() {
16 testHeight = window.getComputedStyle(document.getElementById("image"), null).getPropertyValue("height");
17 referenceHeight = window.getComputedStyle(document.getElementById("body"), null).getPropertyValue("height");
18 if (testHeight == referenceHeight)
19 document.getElementById("console").innerText = "PASSED";
20 else
21 document.getElementById("console").innerText = "FAILED: testHeight=" + testHeight +"; expected " + referenceHeight;
22 if (window.testRunner)
23 testRunner.notifyDone();
25 </script>
26 </head>
27 <body id="body" onload="setTimeout('run()', 0);">
28 <img id="image" src="resources/greenbox.png">
29 <div id="console"/>
30 </body>
31 </html>