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

Side by Side Diff: LayoutTests/fast/regions/webkit-named-flow-event-crash.html

Issue 17176018: [CSS Regions] Add new regionOversetChange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="../../fast/js/resources/js-test-pre.js"></script>
6 <style> 6 <style>
7 body, html { 7 body, html {
8 width: 500px; 8 width: 500px;
9 height: 500px; 9 height: 500px;
10 } 10 }
11 #content { 11 #content {
12 width: 100%; 12 width: 100%;
13 height: 100%; 13 height: 100%;
14 -webkit-flow-into: flow; 14 -webkit-flow-into: flow;
15 } 15 }
16 #region { 16 #region {
17 width: 100%; 17 width: 100%;
18 height: 100%; 18 height: 100%;
19 -webkit-flow-from: flow; 19 -webkit-flow-from: flow;
20 } 20 }
21 </style> 21 </style>
22 </head> 22 </head>
23 <body> 23 <body>
24 <div id="content"> 24 <div id="content">
25 Hello crash! 25 Hello crash!
26 </div> 26 </div>
27 <div id="region"> 27 <div id="region">
28 </div> 28 </div>
29 <script> 29 <script>
30 description("Test for https://bugs.webkit.org/show_bug.cgi?id=102944 [CS S Regions] Crash when dispatching regionlayoutupdate. The test passes if there i s no crash or assert."); 30 description("The test passes if there is no crash or assert.");
31 if (window.testRunner) { 31 if (window.testRunner) {
32 testRunner.dumpAsText(); 32 testRunner.dumpAsText();
33 testRunner.waitUntilDone(); 33 testRunner.waitUntilDone();
34 } 34 }
35 35
36 function dummyHandler (evt) { 36 function dummyHandler (evt) {
37 evt.target.removeEventListener("webkitregionlayoutupdate", dummyHand ler); 37 evt.target.removeEventListener("webkitregionoversetchange", dummyHan dler);
38 debug("This line should not appear!");
38 } 39 }
39 40
40 setTimeout(function() { 41 setTimeout(function() {
41 var namedFlows = document.webkitGetNamedFlows(); 42 var namedFlows = document.webkitGetNamedFlows();
42 namedFlows["flow"].addEventListener("webkitregionlayoutupdate", dumm yHandler); 43 namedFlows["flow"].addEventListener("webkitregionoversetchange", dum myHandler);
43 var content = document.getElementById("content"); 44 var content = document.getElementById("content");
44 var region = document.getElementById("region"); 45 var region = document.getElementById("region");
45 content.style.height = "600px"; 46 content.style.height = "600px";
46 47
47 // Schedule a regionlayoutupdate event. 48 // Schedule a regionoversetchange event.
48 document.body.offsetTop; 49 document.body.offsetTop;
49 50
50 // Transition the flow to the "NULL" state. 51 // Transition the flow to the "NULL" state.
51 document.body.removeChild(content); 52 document.body.removeChild(content);
52 document.body.removeChild(region); 53 document.body.removeChild(region);
53 54
54 setTimeout(function() { 55 setTimeout(function() {
55 if (window.testRunner) 56 if (window.testRunner)
56 testRunner.notifyDone(); 57 testRunner.notifyDone();
57 },0) 58 },0)
58 }, 0); 59 }, 0);
59 </script> 60 </script>
60 <script src="../../fast/js/resources/js-test-post.js"></script> 61 <script src="../../fast/js/resources/js-test-post.js"></script>
61 </body> 62 </body>
62 </html> 63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698