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

Side by Side Diff: LayoutTests/fast/dom/Comment/comment-constructor.html

Issue 382833003: Revert of IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <script> 4 <script>
5 5
6 description('This tests that Comment is constructable.'); 6 description('This tests that Comment is constructable.');
7 7
8 shouldBe('new Comment("one").data', '"one"'); 8 shouldBe('new Comment("one").data', '"one"');
9 shouldBe('new Comment().data', '""'); 9 shouldBe('new Comment().data', '""');
10 shouldBe('new Comment(undefined).data', '""');
11 shouldBe('new Comment(null).data', '"null"');
12 shouldBe('new Comment("two").ownerDocument', 'document'); 10 shouldBe('new Comment("two").ownerDocument', 'document');
13 11
14 shouldBe('typeof new Comment', '"object"'); 12 shouldBe('typeof new Comment', '"object"');
15 shouldBe('Object.prototype.toString.call(new Comment)', '"[object Comment]"'); 13 shouldBe('Object.prototype.toString.call(new Comment)', '"[object Comment]"');
16 shouldBeTrue('new Comment instanceof Comment'); 14 shouldBeTrue('new Comment instanceof Comment');
17 shouldBe('Object.getPrototypeOf(new Comment)', 'Comment.prototype'); 15 shouldBe('Object.getPrototypeOf(new Comment)', 'Comment.prototype');
18 16
19 var frame = document.createElement('iframe'); 17 var frame = document.createElement('iframe');
20 document.body.appendChild(frame); 18 document.body.appendChild(frame);
21 var innerWindow = frame.contentWindow; 19 var innerWindow = frame.contentWindow;
22 var innerDocument = frame.contentDocument; 20 var innerDocument = frame.contentDocument;
23 21
24 shouldBe('new innerWindow.Comment("three").ownerDocument', 'innerDocument') 22 shouldBe('new innerWindow.Comment("three").ownerDocument', 'innerDocument')
25 shouldBeTrue('new innerWindow.Comment instanceof innerWindow.Comment'); 23 shouldBeTrue('new innerWindow.Comment instanceof innerWindow.Comment');
26 shouldBe('Object.getPrototypeOf(new innerWindow.Comment)', 'innerWindow.Comment. prototype'); 24 shouldBe('Object.getPrototypeOf(new innerWindow.Comment)', 'innerWindow.Comment. prototype');
27 25
28 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698