summaryrefslogtreecommitdiffstats
path: root/dom/url/tests/test_url.html
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-16 08:25:45 -0400
committerGitHub <noreply@github.com>2018-04-16 08:25:45 -0400
commitba80720469e27d3d7ae6f1095b3c187207adc051 (patch)
treef864e580c5cd7d99127aac64e9c3ae0ee6e9aa4b /dom/url/tests/test_url.html
parenta66e6546c361d238b0179af18e26bf18aa4a7eb9 (diff)
parentae14556114dcae29f679db7c15f0bc9b707bb89a (diff)
downloadUXP-ba80720469e27d3d7ae6f1095b3c187207adc051.tar
UXP-ba80720469e27d3d7ae6f1095b3c187207adc051.tar.gz
UXP-ba80720469e27d3d7ae6f1095b3c187207adc051.tar.lz
UXP-ba80720469e27d3d7ae6f1095b3c187207adc051.tar.xz
UXP-ba80720469e27d3d7ae6f1095b3c187207adc051.zip
Merge pull request #174 from janekptacijarabaci/url_parser_1
moebius#130: URL parser - fix: don't allow empty host name
Diffstat (limited to 'dom/url/tests/test_url.html')
-rw-r--r--dom/url/tests/test_url.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/dom/url/tests/test_url.html b/dom/url/tests/test_url.html
index d07a752bb..73e75667d 100644
--- a/dom/url/tests/test_url.html
+++ b/dom/url/tests/test_url.html
@@ -399,6 +399,18 @@
</script>
<script>
+ /** Test for Bug 1275746 **/
+ SimpleTest.doesThrow(() => { var url = new URL("http:"); }, "http: is not a valid URL");
+ SimpleTest.doesThrow(() => { var url = new URL("http:///"); }, "http: is not a valid URL");
+
+ var url = new URL("file:");
+ is(url.href, "file:///", "Parsing file: should work.");
+
+ url = new URL("file:///");
+ is(url.href, "file:///", "Parsing file:/// should work.");
+ </script>
+
+ <script>
var url = new URL("scheme:path/to/file?query#hash");
is(url.href, "scheme:path/to/file?query#hash");
is(url.pathname, "path/to/file");