Reviewed by Geoff Garen.
authorbdibello <bdibello@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2005 00:13:39 +0000 (00:13 +0000)
committerbdibello <bdibello@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2005 00:13:39 +0000 (00:13 +0000)
        Test cases added: added DOM test for document.URL

        * layout-tests/fast/dom/HTMLDocument/url/getset.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/dom/HTMLDocument/url/getset.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/fast/dom/HTMLDocument/url/getset.html b/LayoutTests/fast/dom/HTMLDocument/url/getset.html
new file mode 100644 (file)
index 0000000..b30900b
--- /dev/null
@@ -0,0 +1,52 @@
+<html>
+<head>
+<title>URL test</title>
+<script type="text/javascript">
+function print(message) {
+       var paragraph = document.createElement("p");
+       paragraph.appendChild(document.createTextNode(message));
+       document.getElementById("console").appendChild(paragraph);
+}
+
+function test() {
+       //test get URL
+       var len = document.URL.length;
+       var file = document.URL.substring(len - 11);
+       
+       if (file=="getset.html")
+               print("Get: passed");
+       else
+               print("Get: failed");
+               
+       //test set URL
+       if (window.layoutTestController) {
+               window.layoutTestController.dumpAsText();
+       }
+       var origURL = document.URL;
+       
+       document.URL = origURL + '#testAnchor';
+       
+       var newURL = document.URL;
+       
+       if (newURL!=origURL) {
+               print("Set: failed");
+       } else {
+               print("Set: passed");
+       }
+       
+}
+</script>
+</head>
+<body onload="test()">
+<p>Tests: getting and setting HTMLDocument::url<br>
+(Setting should do nothing since URL is readonly)</p>
+<p>Condition(s): </p>
+<p>Success message: passed</p>
+<p>Failure message: failed</p>
+<hr>
+
+<a name='testAnchor'></A>
+
+<div id='console'/>
+</body>
+</html>
index f1deeb547a8480dc2c3c6ab8d1d636e9c4fb9052..6aa2ab4a094f90d462e573a403518be6b2a0df36 100644 (file)
@@ -1,3 +1,11 @@
+2005-06-29  Bruce DiBello  <bdibello@apple.com>
+
+        Reviewed by Geoff Garen.
+
+        Test cases added: added DOM test for document.URL
+
+        * layout-tests/fast/dom/HTMLDocument/url/getset.html: Added.
+
 2005-06-29  Geoffrey Garen  <ggaren@apple.com>
 
        DOM compatibility tests for HTMLDocument::write