blob: c1a8327e62cffd62268295919767cfcb119edbb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE HTML>
<html>
<head>
<title>Test for anchor cache invalidation</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
<a id="x" href="http://example.com"></a>
</div>
<pre id="test">
<script type="application/javascript">
is($("x").href, "http://example.com/");
is($("x").host, "example.com");
$("x").href = "http://www.example.com";
is($("x").href, "http://www.example.com/");
is($("x").host, "www.example.com");
$("x").setAttribute("href", "http://www.example.net/");
is($("x").host, "www.example.net");
</script>
</pre>
</body>
</html>
|