| Index: LayoutTests/fast/domurl/url-href.html
|
| diff --git a/LayoutTests/fast/domurl/url-href.html b/LayoutTests/fast/domurl/url-href.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..984087b9f7fde95c33eec04962d27b25578fba02
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/domurl/url-href.html
|
| @@ -0,0 +1,23 @@
|
| +<!DOCTYPE HTML>
|
| +<link rel="help" href="http://url.spec.whatwg.org/#dom-url-href">
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +
|
| +test(function() {
|
| + var url = new URL('http://www.domain.com/');
|
| + assert_equals(url.href, 'http://www.domain.com/');
|
| + assert_equals(url.href, url.toString());
|
| +
|
| + url.href = 'mailto:foo@bar.com';
|
| + assert_equals(url.href, 'mailto:foo@bar.com');
|
| +
|
| +}, 'href property');
|
| +
|
| +test(function() {
|
| + var url = new URL('http://abc.de/path/file?query#fragment');
|
| + url.href = 'invalid';
|
| + assert_equals(url.href, 'invalid');
|
| +}, 'setting href to an invalid URL');
|
| +
|
| +</script>
|
|
|