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

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

Issue 14931009: Make Comment constructable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Comment/comment-constructor-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <script src="../../js/resources/js-test-pre.js"></script>
4 <script>
5
6 description('This tests that Comment is constructable.');
7
8 shouldBe('new Comment("one").data', '"one"');
9 shouldBe('new Comment().data', '""');
10 shouldBe('new Comment("two").ownerDocument', 'document');
11
12 shouldBe('typeof new Comment', '"object"');
13 shouldBe('Object.prototype.toString.call(new Comment)', '"[object Comment]"');
14 shouldBeTrue('new Comment instanceof Comment');
15 shouldBe('Object.getPrototypeOf(new Comment)', 'Comment.prototype');
16
17 var frame = document.createElement('iframe');
18 document.body.appendChild(frame);
19 var innerWindow = frame.contentWindow;
20 var innerDocument = frame.contentDocument;
21
22 shouldBe('new innerWindow.Comment("three").ownerDocument', 'innerDocument')
23 shouldBeTrue('new innerWindow.Comment instanceof innerWindow.Comment');
24 shouldBe('Object.getPrototypeOf(new innerWindow.Comment)', 'innerWindow.Comment. prototype');
25
26 </script>
27 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Comment/comment-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698