Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: LayoutTests/fast/regions/cssom/webkit-named-flow-event-to-null.html

Issue 159933010: Remove everything region-specific from LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 <script src="../resources/helper.js"></script>
7 <style>
8 #article {
9 -webkit-flow-into: article;
10 border: 2px solid black;
11 }
12 #region_1, #region_2{
13 -webkit-flow-from: no_article;
14 overflow:hidden;
15 display:inline-block;
16 vertical-align:top;
17 margin:10px;
18 }
19 .block {
20 display:block;
21 }
22 #region_1, #region_2 { height:110px; width:200px; margin: 5px;}
23 </style>
24 </head>
25 <body>
26 <div id="article">
27 <div>
28 <div id="content" style="height: 200px; background-color: green;"></div>
29 </div>
30 </div>
31
32 <div id="region_1"></div>
33 <div id="container2">
34 <div id="region_2"></div>
35 </div>
36
37 <script>
38
39 description("Tests regionOversetChange event being dispatched when the content i s removed");
40
41 if (window.testRunner) {
42 testRunner.dumpAsText();
43 testRunner.waitUntilDone();
44 }
45
46 window.jsTestIsAsync = true;
47 function flowContent(flowName) {
48 var r = document.getElementById("region_1");
49 r.style.webkitFlowFrom = flowName;
50 r = document.getElementById("region_2");
51 r.style.webkitFlowFrom = flowName;
52 }
53
54 var count = 0;
55 var regionOversetDispatchedForNullFlow = false;
56 function regionOversetChanged(event) {
57 shouldBeEqualToString("event.target.name", "article");
58 if (++count > 1) {
59 event.target.removeEventListener("webkitregionoversetchange", regionO versetChanged);
60 regionOversetDispatchedForNullFlow = true;
61 return;
62 }
63
64 var el = document.getElementById("region_2");
65 debug("Removing region_2 from flow");
66 el.style.webkitFlowFrom = "none";
67 el = document.getElementById("region_1");
68 debug("Removing region_1 from flow");
69 el.style.webkitFlowFrom = "none";
70 el = document.getElementById("article");
71 debug("Removing article from flow");
72 el.style.webkitFlowInto = "none";
73
74 setTimeout(checkIfEventDispatched, 200);
75 }
76
77 function checkIfEventDispatched() {
78 shouldBeFalse("regionOversetDispatchedForNullFlow");
79 finishJSTest();
80 }
81
82 function startTest() {
83 var flow = getFlowByName("article");
84 flow.addEventListener("webkitregionoversetchange", regionOversetChanged) ;
85
86 debug("Flow content");
87 flowContent("article");
88 }
89 window.addEventListener("load", startTest);
90 </script>
91 </body>
92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698