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

Side by Side Diff: LayoutTests/fast/dom/dom-method-document-change.html

Issue 106773003: Make arguments to Document methods non-optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years 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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 handler = function() 7 handler = function()
8 { 8 {
9 this.removeEventListener("DOMNodeRemoved", handler, false); 9 this.removeEventListener("DOMNodeRemoved", handler, false);
10 doc.adoptNode(this.parentElement); 10 doc.adoptNode(this.parentElement);
11 } 11 }
12 12
13 showFailure = function(s) 13 showFailure = function(s)
14 { 14 {
15 document.body.innerHTML = "FAILURE: " + s; 15 document.body.innerHTML = "FAILURE: " + s;
16 } 16 }
17 17
18 window.onload = function() 18 window.onload = function()
19 { 19 {
20 element1 = document.createElement(); 20 element1 = document.createElement("x");
21 element2 = document.createElement(); 21 element2 = document.createElement("x");
22 element3 = document.createElement(); 22 element3 = document.createElement("x");
23 parent = document.createElement(); 23 parent = document.createElement("x");
24 dummy = document.createElement(); 24 dummy = document.createElement("x");
25 25
26 doc = document.implementation.createHTMLDocument(); 26 doc = document.implementation.createHTMLDocument();
27 27
28 parent.appendChild(element1); 28 parent.appendChild(element1);
29 element1.addEventListener("DOMNodeRemoved", handler, false); 29 element1.addEventListener("DOMNodeRemoved", handler, false);
30 try { 30 try {
31 document.body.appendChild(element1); 31 document.body.appendChild(element1);
32 } catch (e) { } 32 } catch (e) { }
33 if (element1.ownerDocument != element1.parentElement.ownerDocument) 33 if (element1.ownerDocument != element1.parentElement.ownerDocument)
34 return showFailure("appendChild"); 34 return showFailure("appendChild");
(...skipping 10 matching lines...) Expand all
45 try { 45 try {
46 doc.body.replaceChild(element3, dummy); 46 doc.body.replaceChild(element3, dummy);
47 } catch (e) { } 47 } catch (e) { }
48 if (element3.ownerDocument != element3.parentElement.ownerDocument) 48 if (element3.ownerDocument != element3.parentElement.ownerDocument)
49 return showFailure("replaceChild"); 49 return showFailure("replaceChild");
50 } 50 }
51 </script> 51 </script>
52 </head> 52 </head>
53 <body>SUCCESS</body> 53 <body>SUCCESS</body>
54 </html> 54 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/attribute-downcast-right.html ('k') | LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698