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

Side by Side Diff: LayoutTests/fast/events/event-listener-moving-documents.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 <body> 2 <body>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 description('Moving an event listener between documents should keep it active'); 5 description('Moving an event listener between documents should keep it active');
6 6
7 var doc = document.implementation.createHTMLDocument(''); 7 var doc = document.implementation.createHTMLDocument('');
8 var div = doc.createElement('div'); 8 var div = doc.createElement('div');
9 var addedCalls = 0; 9 var addedCalls = 0;
10 var removedCalls = 0; 10 var removedCalls = 0;
11 div.addEventListener('DOMNodeInserted', function() { addedCalls++ }); 11 div.addEventListener('DOMNodeInserted', function() { addedCalls++ });
12 div.addEventListener('DOMNodeRemoved', function() { removedCalls++ }); 12 div.addEventListener('DOMNodeRemoved', function() { removedCalls++ });
13 document.body.appendChild(div); 13 document.body.appendChild(div);
14 shouldBe('addedCalls', '1'); 14 shouldBe('addedCalls', '1');
15 div.appendChild(document.createElement('span')); 15 div.appendChild(document.createElement('span'));
16 shouldBe('addedCalls', '2'); 16 shouldBe('addedCalls', '2');
17 div.removeChild(div.firstChild); 17 div.removeChild(div.firstChild);
18 shouldBe('removedCalls', '1'); 18 shouldBe('removedCalls', '1');
19 </script> 19 </script>
20 </body> 20 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/event-listener-map-rehash-crash.html ('k') | LayoutTests/fast/events/event-listener-sharing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698