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

Side by Side Diff: LayoutTests/fast/dom/Range/range-constructor.html

Issue 14904005: Make Range constructable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations 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/Range/range-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 <script src="../../js/resources/js-test-pre.js"></script>
3 <div id="test-div">Test</div>
4 <script>
5
6 description('Tests that we can create instances of Range using new');
7
8 shouldBe('typeof new Range', '"object"');
9 shouldBe('Object.prototype.toString.call(new Range)', '"[object Range]"');
10 shouldBeTrue('new Range instanceof Range');
11 shouldBe('Object.getPrototypeOf(new Range)', 'Range.prototype');
12
13 var r = new Range();
14 r.selectNodeContents(document.getElementById('test-div'));
15 shouldBe('r.toString()', '"Test"')
16
17 var frame = document.createElement('iframe');
18 document.body.appendChild(frame);
19 var innerWindow = frame.contentWindow;
20 var innerDocument = frame.contentDocument;
21 innerDocument.body.textContent = 'Inner';
22
23 shouldBeTrue('new innerWindow.Range instanceof innerWindow.Range');
24 shouldBe('Object.getPrototypeOf(new innerWindow.Range)', 'innerWindow.Range.prot otype');
25
26 var r = new innerWindow.Range();
27 r.selectNodeContents(innerDocument.body);
28 shouldBe('r.toString()', '"Inner"');
29
30 </script>
31 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/range-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698