| Index: LayoutTests/fast/dom/Range/range-constructor.html
|
| diff --git a/LayoutTests/fast/dom/Range/range-constructor.html b/LayoutTests/fast/dom/Range/range-constructor.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9faffcd89885db55fd8cfdc312282bd21c8ec4d5
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/Range/range-constructor.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../js/resources/js-test-pre.js"></script>
|
| +<div id="test-div">Test</div>
|
| +<script>
|
| +
|
| +description('Tests that we can create instances of Range using new');
|
| +
|
| +shouldBe('typeof new Range', '"object"');
|
| +shouldBe('Object.prototype.toString.call(new Range)', '"[object Range]"');
|
| +shouldBeTrue('new Range instanceof Range');
|
| +shouldBe('Object.getPrototypeOf(new Range)', 'Range.prototype');
|
| +
|
| +var r = new Range();
|
| +r.selectNodeContents(document.getElementById('test-div'));
|
| +shouldBe('r.toString()', '"Test"')
|
| +
|
| +var frame = document.createElement('iframe');
|
| +document.body.appendChild(frame);
|
| +var innerWindow = frame.contentWindow;
|
| +var innerDocument = frame.contentDocument;
|
| +innerDocument.body.textContent = 'Inner';
|
| +
|
| +shouldBeTrue('new innerWindow.Range instanceof innerWindow.Range');
|
| +shouldBe('Object.getPrototypeOf(new innerWindow.Range)', 'innerWindow.Range.prototype');
|
| +
|
| +var r = new innerWindow.Range();
|
| +r.selectNodeContents(innerDocument.body);
|
| +shouldBe('r.toString()', '"Inner"');
|
| +
|
| +</script>
|
| +<script src="../../js/resources/js-test-post.js"></script>
|
|
|