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

Side by Side Diff: LayoutTests/fast/html/imports/import-events.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <link id="harness" rel="import" href="resources/import-events-target.html"> 5 <link id="harness" rel="import" href="resources/import-events-target.html">
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 description("Test that events can be fired on imported documents."); 9 description("Test that events can be fired on imported documents.");
10 10
11 function handle(list, id, event) 11 function handle(list, id, event)
12 { 12 {
13 list.push(event.type + "@" + id); 13 list.push(event.type + "@" + id);
14 } 14 }
15 15
16 function testEventsFiredOn(doc) 16 function testEventsFiredOn(doc)
17 { 17 {
18 window.caughtFoo = []; 18 window.caughtFoo = [];
19 var root = doc.documentElement; 19 var root = doc.documentElement;
20 var target = doc.getElementById("target"); 20 var target = doc.getElementById("target");
21 21
22 target.addEventListener("foo", handle.bind(null, caughtFoo, "target")); 22 target.addEventListener("foo", handle.bind(null, caughtFoo, "target"));
23 root.addEventListener("foo", handle.bind(null, caughtFoo, "root")); 23 root.addEventListener("foo", handle.bind(null, caughtFoo, "root"));
24 target.dispatchEvent(new CustomEvent("foo", { bubbles: true })); 24 target.dispatchEvent(new CustomEvent("foo", { bubbles: true }));
25 25
26 shouldBe("window.caughtFoo", "['foo@target', 'foo@root']"); 26 shouldBe("window.caughtFoo", "['foo@target', 'foo@root']");
27 } 27 }
28 28
29 testEventsFiredOn(harness.import); 29 testEventsFiredOn(harness.import);
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/html/imports/import-element-removed-flag.html ('k') | LayoutTests/fast/html/imports/import-in-iframe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698