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

Side by Side Diff: LayoutTests/fast/regions/cssom/webkit-named-flow-event-remove-from-dom.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 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script src="../resources/helper.js"></script>
5 <style>
6 #article {
7 -webkit-flow-into: article;
8 border: 2px solid black;
9 }
10 #region_1, #region_2{
11 -webkit-flow-from: no_article;
12 overflow:hidden;
13 display:inline-block;
14 vertical-align:top;
15 margin:10px;
16 }
17 .block {
18 display:block;
19 }
20 #region_1, #region_2 { height:110px; width:200px; margin: 5px; border: 1px solid red;}
21 </style>
22 </head>
23 <body>
24 <div id="description" class="block"></div>
25 <div id="article">
26 <div>
27 <div id="content" style="height: 200px; background-color: green;"></div>
28 </div>
29 </div>
30
31 <div id="region_1"></div>
32 <div id="container2">
33 <div id="region_2"></div>
34 </div>
35
36 <div id="console" class="block"></div>
37
38 <script>
39 description("Tests regionOversetChange event")
40 if (window.testRunner) {
41 testRunner.dumpAsText();
42 testRunner.waitUntilDone();
43 }
44
45 window.jsTestIsAsync = true;
46 function flowContent(flowName) {
47 var r = document.getElementById("region_1");
48 r.style.webkitFlowFrom = flowName;
49 r = document.getElementById("region_2");
50 r.style.webkitFlowFrom = flowName;
51 }
52
53 var eventCount = 0;
54 function finishTest() {
55 shouldBe("eventCount", "2");
56 finishJSTest();
57 }
58
59 function regionOversetChanged(event) {
60 shouldBeEqualToString("event.target.name", "article");
61 if (++eventCount > 1) {
62 event.target.removeEventListener("webkitregionoversetchange", regionO versetChanged);
63 // this should be reached after region_2 is removed from DOM
64 finishTest();
65 return;
66 }
67
68 var c2 = document.getElementById("container2");
69 debug("Removing region_2 from DOM");
70 c2.innerHTML = ""; // this will trigger a new round of events due to lay out
71 }
72
73 function startTest() {
74 var flow = getFlowByName("article");
75 flow.addEventListener("webkitregionoversetchange", regionOversetChanged) ;
76
77 debug("Flow content");
78 flowContent("article");
79 }
80 window.addEventListener("load", startTest);
81 </script>
82 </body>
83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698