Reviewed by Darin.
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Aug 2007 10:05:31 +0000 (10:05 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Aug 2007 10:05:31 +0000 (10:05 +0000)
        Add test for http://bugs.webkit.org/attachment.cgi?id=15818&action=edit which
        Mitz fixed in r24973.

        I had a fix for <rdar://problem/5267021>
        REGRESSION: Loading Slashdot Firehose is 9X slower on Safari 3.0 than Safari 2.0
        which turned out to be a dublicate.

        At least we can use the layout test I did.

        * http/tests/local/style-access-before-stylesheet-loaded-expected.txt: Added.
        * http/tests/local/style-access-before-stylesheet-loaded.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/local/style-access-before-stylesheet-loaded-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/local/style-access-before-stylesheet-loaded.html [new file with mode: 0644]

index f40cdf2..21f8064 100644 (file)
@@ -1,3 +1,19 @@
+2007-08-11  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Darin.
+        
+        Add test for http://bugs.webkit.org/attachment.cgi?id=15818&action=edit which
+        Mitz fixed in r24973.
+        
+        I had a fix for <rdar://problem/5267021>
+        REGRESSION: Loading Slashdot Firehose is 9X slower on Safari 3.0 than Safari 2.0
+        which turned out to be a dublicate.
+        
+        At least we can use the layout test I did.
+
+        * http/tests/local/style-access-before-stylesheet-loaded-expected.txt: Added.
+        * http/tests/local/style-access-before-stylesheet-loaded.html: Added.
+
 2007-08-11  Matt Lilek  <pewtermoose@gmail.com>
 
         Reviewed over and over and over by Adam Roben.
diff --git a/LayoutTests/http/tests/local/style-access-before-stylesheet-loaded-expected.txt b/LayoutTests/http/tests/local/style-access-before-stylesheet-loaded-expected.txt
new file mode 100644 (file)
index 0000000..d4ca090
--- /dev/null
@@ -0,0 +1,3 @@
+This page has a slow loading external style sheet. Calling offsetLeft shouldn't be slow when stylesheets are loading. Works as HTTP test only.
+PASS
+
diff --git a/LayoutTests/http/tests/local/style-access-before-stylesheet-loaded.html b/LayoutTests/http/tests/local/style-access-before-stylesheet-loaded.html
new file mode 100644 (file)
index 0000000..a64c5d6
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+<head>
+<script>  
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+            
+function test() {
+    var start = new Date().getTime();
+    var e = document.getElementById('t');
+    var console = document.getElementById('console');
+    for (n = 0; n < 1000; n++)
+        e.offsetLeft;
+    var time = new Date().getTime() - start;
+    console.innerHTML = ((time < 500) ? "<span style='color:green'>PASS</span> " :  "<span style='color:red'>FAIL</span> ");// + time;
+}
+</script>
+
+<link rel=stylesheet href="http://127.0.0.1:8000/local/slow-css-pass.cgi">
+
+</head>
+<body>
+This page has a slow loading external style sheet. Calling offsetLeft shouldn't be slow when stylesheets are loading. 
+Works as HTTP test only.
+<div id=console></div>
+<div id=t></div>
+<script>
+// increase document complexity a bit
+for (n = 0; n < 500; n++)
+    document.write("<div><span></span><div><span></span></div></div>");
+setTimeout(test, 0);
+</script>
+</body>
+</html>