Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / cssom / webkit-named-flow-flow-added.html
1 <!doctype html>
2 <html>
3     <!--
4     Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
5     Test that getting a WebKitNamedFlow for a flow that was added returns a non-null object.
6     On success, you should see a PASS below.
7     -->
8     <head>
9         <script src="../resources/helper.js"></script>
10         <style>
11             .pass {
12                 font-weight: bold;
13                 color: green;
14             }
15
16             .fail {
17                 font-weight: bold;
18                 color: red;
19             }
20
21             .flow {
22                 -webkit-flow-into: flow;
23             }
24
25             .noFlow {
26                 -webkit-flow-into: none;
27             }
28         </style>
29     </head>
30     <body onload="test()">
31         <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
32         <p>Getting a WebKitNamedFlow object for a flow that was added should return a non-null object.</p>
33         <p>On success, you should see PASS below.</p>
34         <div id="article" class="noFlow"></div>
35         <div id="result" class="fail">FAIL</div>
36         <script>
37             if (window.testRunner)
38                 testRunner.dumpAsText();
39
40             // Get the named flow object before adding the flow thread.
41             var namedFlow = getFlowByName("flow");
42             var namedFlow2;
43
44             function test()
45             {
46                 namedFlow2 = getFlowByName("flow");
47                 if (!namedFlow && namedFlow2) {
48                     document.getElementById("result").innerText = "PASS";
49                     document.getElementById("result").className = "pass";
50                 }
51             }
52
53             document.getElementById("article").className = "flow";
54         </script>
55     </body>
56 </html>