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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/move-event-handler-between-framehosts.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 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 <html> 1 <html>
2 <body onload="startTest()"> 2 <body onload="startTest()">
3 3
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 6
7 description("This test checks that moving an element with an event handler from one window (FrameHost) to another properly migrates the handler too."); 7 description("This test checks that moving an element with an event handler from one window (FrameHost) to another properly migrates the handler too.");
8 8
9 var jsTestIsAsync = true; 9 var jsTestIsAsync = true;
10 var window2; 10 var window2;
11 11
12 function window2Loaded() { 12 function window2Loaded() {
13 shouldBe('window.internals.scrollEventHandlerCount(document)', '0'); 13 shouldBe('window.internals.scrollEventHandlerCount(document)', '0');
14 var div = window2.document.getElementById("div"); 14 var div = window2.document.getElementById("div");
15 window.document.adoptNode(div); 15 window.document.adoptNode(div);
16 window.document.body.appendChild(div); 16 window.document.body.appendChild(div);
17 shouldBe('window.internals.scrollEventHandlerCount(document)', '1'); 17 shouldBe('window.internals.scrollEventHandlerCount(document)', '1');
18 18
19 window2.close(); 19 window2.close();
20 finishJSTest(); 20 finishJSTest();
21 } 21 }
22 22
23 function startTest() { 23 function startTest() {
24 if (window.testRunner) { 24 if (window.testRunner) {
25 testRunner.waitUntilDone(); 25 testRunner.waitUntilDone();
26 testRunner.setCanOpenWindows(); 26 testRunner.setCanOpenWindows();
27 } 27 }
28 window2 = window.open('data:text/html,<div id="div" onscroll="function() {}" ></div>'); 28 window2 = window.open('resources/move-event-handler-between-framehosts-popup .html');
29 window2.addEventListener("load", window2Loaded, false); 29 window2.addEventListener("load", window2Loaded, false);
30 } 30 }
31 31
32 </script> 32 </script>
33 33
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698