Land test case that was supposed to be in r53607.
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 May 2010 01:25:53 +0000 (01:25 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 May 2010 01:25:53 +0000 (01:25 +0000)
    2010-01-20  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

        Stylesheet href property shows redirected URL unlike other browsers
        https://bugs.webkit.org/show_bug.cgi?id=33683

        Test whether the href property of style sheets contains the original or
        final URL of the redirect chain that lead to the style sheet.

        I couldn't figure out how to test the XSLStyleSheet parts of this
        change.  There didn't seem to be DOM bindings for the href property
        here.  If I missed it, please let me know.

        * http/tests/security/stylesheet-href-redirect-expected.txt: Added.
        * http/tests/security/stylesheet-href-redirect.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/security/stylesheet-href-redirect-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/stylesheet-href-redirect.html [new file with mode: 0644]

index c426a22..817e2b5 100644 (file)
@@ -1,3 +1,24 @@
+2010-05-01  David Kilzer  <ddkilzer@apple.com>
+
+        Land test case that was supposed to be in r53607.
+
+    2010-01-20  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Stylesheet href property shows redirected URL unlike other browsers
+        https://bugs.webkit.org/show_bug.cgi?id=33683
+
+        Test whether the href property of style sheets contains the original or
+        final URL of the redirect chain that lead to the style sheet.
+
+        I couldn't figure out how to test the XSLStyleSheet parts of this
+        change.  There didn't seem to be DOM bindings for the href property
+        here.  If I missed it, please let me know.
+
+        * http/tests/security/stylesheet-href-redirect-expected.txt: Added.
+        * http/tests/security/stylesheet-href-redirect.html: Added.
+
 2010-05-01  Robert Hogan  <robert@webkit.org>
 
         Unreviewed fix to height/width rendering differences in results added
diff --git a/LayoutTests/http/tests/security/stylesheet-href-redirect-expected.txt b/LayoutTests/http/tests/security/stylesheet-href-redirect-expected.txt
new file mode 100644 (file)
index 0000000..c6c1660
--- /dev/null
@@ -0,0 +1,2 @@
+A style sheet's href should be the original URL, not the final URL, of the redirect chain:
+http://localhost:8000/security/resources/redir.php?url=http://localhost:8000/security/resources/cssStyle.css
diff --git a/LayoutTests/http/tests/security/stylesheet-href-redirect.html b/LayoutTests/http/tests/security/stylesheet-href-redirect.html
new file mode 100644 (file)
index 0000000..3d27100
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<link rel="stylesheet" type="text/css"
+  href="http://localhost:8000/security/resources/redir.php?url=http://localhost:8000/security/resources/cssStyle.css">
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function log(msg) {
+    document.getElementById('console').innerHTML = msg;
+}
+
+window.onload = function() {
+    log(document.styleSheets[0].href);
+}
+</script>
+</head>
+<body>
+A style sheet's href should be the original URL, not the final URL, of the
+redirect chain:
+<div id="console">Waiting...</div>
+</body>
+</html>