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

Side by Side Diff: LayoutTests/fast/dom/adopt-node-prevented.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 </head> 5 </head>
6 <body> 6 <body>
7 <div id="newParent"></div> 7 <div id="newParent"></div>
8 <a href="#" id="target"></a> 8 <a href="#" id="target"></a>
9 <script> 9 <script>
10 description("Test that adoptNode fails safely if prevented by a DOM mutation."); 10 description("Test that adoptNode fails safely if prevented by a DOM mutation.");
11 11
12 function run() { 12 function run() {
13 newParent = document.getElementById("newParent"); 13 newParent = document.getElementById("newParent");
14 target = document.getElementById("target"); 14 target = document.getElementById("target");
15 target.addEventListener("blur", function () { newParent.appendChild(target); }, false); 15 target.addEventListener("blur", function () { newParent.appendChild(target); }, false);
16 target.focus(); 16 target.focus();
17 var anotherDocument = document.implementation.createDocument("", "", null); 17 var anotherDocument = document.implementation.createDocument("", "", null);
18 18
19 try { anotherDocument.adoptNode(target); } catch(e) {} 19 try { anotherDocument.adoptNode(target); } catch(e) {}
20 shouldBe("target.ownerDocument.location", "document.location"); 20 shouldBe("target.ownerDocument.location", "document.location");
21 } 21 }
22 22
23 document.addEventListener("DOMContentLoaded", run, false); 23 document.addEventListener("DOMContentLoaded", run, false);
24 </script> 24 </script>
25 </body> 25 </body>
26 </html> 26 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html ('k') | LayoutTests/fast/dom/allowed-children.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698