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

Side by Side Diff: LayoutTests/fast/dom/incompatible-operations.html

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 6
7 <script> 7 <script>
8 description('This test checks the behavior of DOM operations when called on non- DOM or incompatible receivers with non-DOM or incompatible arguments.'); 8 description('This test checks the behavior of DOM operations when called on non- DOM or incompatible receivers with non-DOM or incompatible arguments.');
9 9
10 function trySuspect(fun) { 10 function trySuspect(fun) {
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 var aDOMImplementation = document.implementation; 23 var aDOMImplementation = document.implementation;
24 24
25 var aSelect = document.createElement("select"); 25 var aSelect = document.createElement("select");
26 var anOption = document.createElement("option"); 26 var anOption = document.createElement("option");
27 var aNode = document.createElement("div"); 27 var aNode = document.createElement("div");
28 var aSecondNode = document.createElement("div"); 28 var aSecondNode = document.createElement("div");
29 aNode.appendChild(aSecondNode); 29 aNode.appendChild(aSecondNode);
30 30
31 shouldThrow("aNode.appendChild(aDOMImplementation)", "'Error: NotFoundError: DOM Exception 8'"); 31 shouldThrow("aNode.appendChild(aDOMImplementation)", "'NotFoundError: An attempt was made to reference a Node in a context where it does not exist.'");
32 32
33 shouldThrow("aNode.appendChild('knort')", "'Error: NotFoundError: DOM Exception 8'"); 33 shouldThrow("aNode.appendChild('knort')", "'NotFoundError: An attempt was made t o reference a Node in a context where it does not exist.'");
34 34
35 shouldThrow("aNode.appendChild(void 0)", "'Error: NotFoundError: DOM Exception 8 '"); 35 shouldThrow("aNode.appendChild(void 0)", "'NotFoundError: An attempt was made to reference a Node in a context where it does not exist.'");
36 36
37 shouldBeFalse("aNode.isSameNode(aDOMImplementation)"); 37 shouldBeFalse("aNode.isSameNode(aDOMImplementation)");
38 shouldBeFalse("aNode.isSameNode('foo')"); 38 shouldBeFalse("aNode.isSameNode('foo')");
39 shouldBeFalse("aNode.isSameNode(void 0)"); 39 shouldBeFalse("aNode.isSameNode(void 0)");
40 shouldBe("aNode.lookupPrefix(aDOMImplementation)", "null"); 40 shouldBe("aNode.lookupPrefix(aDOMImplementation)", "null");
41 shouldBe("aNode.lookupPrefix(void 0)", "null"); 41 shouldBe("aNode.lookupPrefix(void 0)", "null");
42 shouldBeTrue("aNode.cloneNode(aDOMImplementation) instanceof HTMLDivElement"); 42 shouldBeTrue("aNode.cloneNode(aDOMImplementation) instanceof HTMLDivElement");
43 shouldBeUndefined("aSelect.add(aDOMImplementation, aDOMImplementation)"); 43 shouldBeUndefined("aSelect.add(aDOMImplementation, aDOMImplementation)");
44 shouldBeUndefined("aSelect.add(aDOMImplementation, anOption)"); 44 shouldBeUndefined("aSelect.add(aDOMImplementation, anOption)");
45 shouldBeUndefined("aSelect.add(anOption, aDOMImplementation)"); 45 shouldBeUndefined("aSelect.add(anOption, aDOMImplementation)");
46 shouldBeUndefined("aSelect.add(void 0, void 0)"); 46 shouldBeUndefined("aSelect.add(void 0, void 0)");
47 shouldBeUndefined("aSelect.add(void 0, anOption)"); 47 shouldBeUndefined("aSelect.add(void 0, anOption)");
48 shouldBeUndefined("aSelect.add(anOption, void 0)"); 48 shouldBeUndefined("aSelect.add(anOption, void 0)");
49 </script> 49 </script>
50 <script src="../js/resources/js-test-post.js"></script> 50 <script src="../js/resources/js-test-post.js"></script>
51 </body> 51 </body>
52 </html> 52 </html>
53 53
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/importNode-null-expected.txt ('k') | LayoutTests/fast/dom/incompatible-operations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698