Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / images / style-access-during-imageChanged-style-freeze.html
blobab0c91563e8a7aee33e58f12455bd6d4cb550cff
1 <style>
2 #target[foo] { color: green; }
3 </style>
4 <div id="container">
5 <div>
6 <img src="x-invalid:" alt="Some wide text">
7 <div id="target">
8 This should be green, with a wide broken image above.
9 </div>
10 </div>
11 </div>
12 <div id="result"></div>
13 <script>
14 onload = function() {
15 if (window.testRunner)
16 testRunner.dumpAsText();
18 document.body.offsetTop;
19 var container = document.getElementById("container");
20 container.style.display = "none";
21 document.body.offsetTop;
22 container.style.removeProperty("display");
23 document.body.offsetTop;
24 var target = document.getElementById("target");
25 target.setAttribute("foo", "");
26 document.body.offsetTop;
27 var result = document.getElementById("result");
28 result.innerText = getComputedStyle(target).color === "rgb(0, 128, 0)" ? "PASS" : "FAIL";
30 </script>