Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / region-element-dynamic-detach-flow.html
1 <!doctype html>
2 <html>
3     <head>
4         <style>
5             .region
6             {
7                 -webkit-flow-from: no-flow;
8             }
9         </style>
10     </head>
11     <body>
12         <p>Tests that changing a region element into a normal element makes the element's content available.</p>
13         <div class="region">
14             <div id="region_content">This text should be visible when the element is no longer a region.</div>
15         </div>
16         <script>
17             if (window.testRunner)
18                 testRunner.dumpAsText();
19             var region = document.getElementsByClassName("region")[0];
20             // The element is a region without a connected flow, its content is not available.
21             var pass = region.innerText.length == 0;
22             // The element becomes a normal element, its content becomes available.
23             region.className = "";
24             pass &= region.innerText.length != 0;
25             document.write("<p>" + pass ? "PASS" : "FAIL" + "</p>");
26         </script>
27     </body>
28 </html>