Adding a test

This commit is contained in:
Boris Zbarsky 2010-02-12 14:12:00 -05:00
parent 5ba5f4d80f
commit 134f48b881
2 changed files with 29 additions and 0 deletions

View File

@ -136,6 +136,7 @@ _TEST_FILES = test_bug589.html \
test_bug347174_xslp.html \
347174transformable.xml \
347174transform.xsl \
test_anchor_href_cache_invalidation.html \
test_bug481335.xhtml \
test_bug500885.html \
test_bug514856.html \

View File

@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for anchor cache invalidation</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" 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");
</script>
</pre>
</body>
</html>