4 While working on bug 402210, it came up that the code was doing
8 which technically produces "https:host" instead of "https://host" and
9 that the code was relying on href's setting having fixup behaviour
10 for this kind of thing.
12 If we rely on it, we might as well test for it, even if it isn't the
13 problem 402210 was meant to fix.
15 https://bugzilla.mozilla.org/show_bug.cgi?id=402210
18 <title>Test for Bug
402210</title>
19 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
20 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
21 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
24 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=402210">Mozilla Bug
402210</a>
26 <a id=
"testlink">Test Link
</a>
28 <div id=
"content" style=
"display: none">
32 <script class=
"testbody" type=
"text/javascript">
34 SimpleTest.waitForExplicitFinish();
37 $(
"testlink").href =
"https:example.com";
38 is($(
"testlink").href,
"https://example.com/",
"Setting href on an anchor tag should fixup missing slashes after https protocol");
40 $(
"testlink").href =
"ftp:example.com";
41 is($(
"testlink").href,
"ftp://example.com/",
"Setting href on an anchor tag should fixup missing slashes after non-http protocol");
46 addLoadEvent(runTest);