Reviewed by Tim H.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 09:25:59 +0000 (09:25 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 09:25:59 +0000 (09:25 +0000)
        http://bugzilla.opendarwin.org/show_bug.cgi?id=4508
        Layout tests access an external server

        * fast/backgrounds/repeat/noRepeatCorrectClip.html: Use a local resource (it was already present,
        but the test still pointed to a remote one).
        * fast/dom/HTMLImageElement/image-src-absolute-url-expected.txt:
        * fast/dom/HTMLImageElement/image-src-absolute-url.html: Use a non-existent file URL instead of
        a non-existent http one.
        * fast/loader/docLoaderFrame-expected.checksum: Removed.
        * fast/loader/docLoaderFrame-expected.png: Removed.
        * fast/loader/docLoaderFrame-expected.txt: Removed.
        * fast/loader/docLoaderFrame.html: Removed.
        * http/tests/xmlhttprequest/docLoaderFrame-expected.txt: Added.
        * http/tests/xmlhttprequest/docLoaderFrame.html: Added.
        * http/tests/xmlhttprequest/resources/docLoaderFrame-data.html: Added.
        Use a local resource. Also, turned the test into a text one, and used waitUntilDone to make it
        actually work.

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

LayoutTests/ChangeLog
LayoutTests/fast/backgrounds/repeat/noRepeatCorrectClip.html
LayoutTests/fast/dom/HTMLImageElement/image-src-absolute-url-expected.txt
LayoutTests/fast/dom/HTMLImageElement/image-src-absolute-url.html
LayoutTests/fast/loader/docLoaderFrame-expected.checksum [deleted file]
LayoutTests/fast/loader/docLoaderFrame-expected.png [deleted file]
LayoutTests/fast/loader/docLoaderFrame-expected.txt [deleted file]
LayoutTests/fast/loader/docLoaderFrame.html [deleted file]
LayoutTests/http/tests/xmlhttprequest/docLoaderFrame-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/docLoaderFrame.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/resources/docLoaderFrame-data.html [new file with mode: 0644]

index 639c941c2c5705f1c3a7605069388af09b023ef4..22d84ba7aac6c13362fb10d804954b9c36104d6a 100644 (file)
@@ -1,3 +1,25 @@
+2006-09-03  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Tim H.
+
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=4508
+        Layout tests access an external server
+
+        * fast/backgrounds/repeat/noRepeatCorrectClip.html: Use a local resource (it was already present,
+        but the test still pointed to a remote one).
+        * fast/dom/HTMLImageElement/image-src-absolute-url-expected.txt:
+        * fast/dom/HTMLImageElement/image-src-absolute-url.html: Use a non-existent file URL instead of 
+        a non-existent http one.
+        * fast/loader/docLoaderFrame-expected.checksum: Removed.
+        * fast/loader/docLoaderFrame-expected.png: Removed.
+        * fast/loader/docLoaderFrame-expected.txt: Removed.
+        * fast/loader/docLoaderFrame.html: Removed.
+        * http/tests/xmlhttprequest/docLoaderFrame-expected.txt: Added.
+        * http/tests/xmlhttprequest/docLoaderFrame.html: Added.
+        * http/tests/xmlhttprequest/resources/docLoaderFrame-data.html: Added.
+        Use a local resource. Also, turned the test into a text one, and used waitUntilDone to make it 
+        actually work.
+
 2006-09-02  Graham Dennis  <graham.dennis@gmail.com>
 
         Reviewed by Justin.
index 004097ab59732a0108032e868be642f239db9fb2..f18d1d9777f7146b1e6b5491ef4ab2bc3fd99662 100644 (file)
@@ -1,7 +1,7 @@
 <head>
        <style>
             ul#nav li { 
-                background:url(http://i.a.cnn.net/cnn/.element/img/1.3/nav/nav.blue.gif) 
+                background:url(resources/nav.blue.gif)
                 no-repeat;
             }
         </style>
index 76128d956df1bcdb03f9695bba2ef311b949f1ab..03014b8023f69f4f066fe5d615098a05e6dec261 100644 (file)
@@ -2,10 +2,10 @@ This page preloads 2 images in an onLoad function.
 The image object.src is expected to be the full path to the image, relative to the document base.
 To match WinIE (but not FireFox), we resolve the image path in the getter, rather than the setter, allowing for pages to change the Document base URL via javascript and have object.src reflect said change.
 
-SUCCESS (document.images[0].src = http://www.apple.com/test.jpg)
-SUCCESS (IconImages['grey'].src = http://www.apple.com/test.jpg)
+SUCCESS (document.images[0].src = file:///does/not/exist/test.jpg)
+SUCCESS (IconImages['grey'].src = file:///does/not/exist/test.jpg)
 After changing the base URL:
 
-SUCCESS (document.images[0].src = http://www.apple.com/test.jpg)
-SUCCESS (IconImages['grey'].src = http://www.example.com/test.jpg)
+SUCCESS (document.images[0].src = file:///does/not/exist/test.jpg)
+SUCCESS (IconImages['grey'].src = file:///also/does/not/exist/test.jpg)
 
index 5d1a314ea5be1c6ad8b527db8aa44d6751f66eb1..1190a7da74810372a1ff4feccbf64d824c4231b2 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
        <title>Image Tester</title>
-       <base id="foo" href="http://www.apple.com/">
+       <base id="foo" href="file:///does/not/exist/">
 
 <script type="text/javascript" language="javascript">
        var IconImages = null;
                document.images["grey"].src = IconImages["grey"].src;
                        
                var beforeDiv = document.getElementById("before");
-               beforeDiv.innerHTML = stringResult("document.images[0].src", "http://www.apple.com/test.jpg");
-               beforeDiv.innerHTML += "<br>" + stringResult("IconImages['grey'].src", "http://www.apple.com/test.jpg");
+               beforeDiv.innerHTML = stringResult("document.images[0].src", "file:///does/not/exist/test.jpg");
+               beforeDiv.innerHTML += "<br>" + stringResult("IconImages['grey'].src", "file:///does/not/exist/test.jpg");
                
-               document.getElementById("foo").setAttribute("href", "http://www.example.com/");
+               document.getElementById("foo").setAttribute("href", "file:///also/does/not/exist/");
                var afterDiv = document.getElementById("after");
-               afterDiv.innerHTML = stringResult("document.images[0].src", "http://www.apple.com/test.jpg");
-               afterDiv.innerHTML += "<br>" + stringResult("IconImages['grey'].src", "http://www.example.com/test.jpg");
+               afterDiv.innerHTML = stringResult("document.images[0].src", "file:///does/not/exist/test.jpg");
+               afterDiv.innerHTML += "<br>" + stringResult("IconImages['grey'].src", "file:///also/does/not/exist/test.jpg");
        }
 </script>
 </head>
diff --git a/LayoutTests/fast/loader/docLoaderFrame-expected.checksum b/LayoutTests/fast/loader/docLoaderFrame-expected.checksum
deleted file mode 100644 (file)
index d69a371..0000000
+++ /dev/null
@@ -1 +0,0 @@
-853de00567d121bea0b7bece66a5d61c
\ No newline at end of file
diff --git a/LayoutTests/fast/loader/docLoaderFrame-expected.png b/LayoutTests/fast/loader/docLoaderFrame-expected.png
deleted file mode 100644 (file)
index 113fea4..0000000
Binary files a/LayoutTests/fast/loader/docLoaderFrame-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/loader/docLoaderFrame-expected.txt b/LayoutTests/fast/loader/docLoaderFrame-expected.txt
deleted file mode 100644 (file)
index 27d5835..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,0) size 784x600
diff --git a/LayoutTests/fast/loader/docLoaderFrame.html b/LayoutTests/fast/loader/docLoaderFrame.html
deleted file mode 100644 (file)
index bdb4106..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Crash XML Parser</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<script language="JavaScript" type="text/JavaScript">
-
-var rq;
-
-function loadXMLDoc( url )
-{
-       url = 'http://www.npr.org/rss/';
-
-       rq = false;
-       if (window.XMLHttpRequest) {
-               try {
-                       rq = new XMLHttpRequest();
-                       rq.overrideMimeType('text/xml');
-               } catch(e) {
-                       rq = false;
-               }
-       }
-
-       if (rq) {
-               rq.onreadystatechange = processReqChange;
-               rq.open('GET', url, true);
-               rq.send();
-       }
-}
-
-function processReqChange()
-{
-       if (rq.readyState == 4) {
-               if (rq.status == 200) {
-                       var xmlDoc = rq.responseXML;
-               } else {
-                       alert('There was a problem retrieving the XML data: ' + rq.statusText );
-               }
-       }
-}
-</script>
-</head>
-<body topmargin="0" marginheight="0" onLoad="javascript:loadXMLDoc();">
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/http/tests/xmlhttprequest/docLoaderFrame-expected.txt b/LayoutTests/http/tests/xmlhttprequest/docLoaderFrame-expected.txt
new file mode 100644 (file)
index 0000000..fd062ef
--- /dev/null
@@ -0,0 +1,5 @@
+Test for rdar://problem/4298052: Crash in KWQCheckIfReloading at http://www.inquisitorx.com/beta/
+
+SUCCESS (did not crash)
+
+
diff --git a/LayoutTests/http/tests/xmlhttprequest/docLoaderFrame.html b/LayoutTests/http/tests/xmlhttprequest/docLoaderFrame.html
new file mode 100644 (file)
index 0000000..806c9df
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Crash XML Parser</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<script language="JavaScript" type="text/JavaScript">
+
+var rq;
+
+function loadXMLDoc()
+{
+    url = 'resources/docLoaderFrame-data.html';
+
+    rq = false;
+    
+    try {
+      if (window.XMLHttpRequest) {
+        rq = new XMLHttpRequest();
+        rq.overrideMimeType('text/xml');
+        rq.onreadystatechange = processReqChange;
+        rq.open('GET', url, true);
+        rq.send();
+      }
+    } catch (ex) {
+        rq = false;
+        alert(ex);
+    }
+}
+
+function processReqChange()
+{
+    if (rq.readyState == 4) {
+        if (rq.status == 200) {
+            var xmlDoc = rq.responseXML;
+            document.getElementById("result").textContent = "SUCCESS (did not crash)";
+        } else {
+            alert('There was a problem retrieving the XML data: ' + rq.statusText);
+        }
+        
+        if (window.layoutTestController) {
+            layoutTestController.notifyDone();
+        }
+    }
+}
+</script>
+</head>
+
+<body onLoad="javascript:loadXMLDoc();">
+<p>Test for <a href="rdar://problem/4298052">rdar://problem/4298052</a>: Crash in KWQCheckIfReloading at http://www.inquisitorx.com/beta/</p>
+<p id="result"></p>
+<script>
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+</script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/docLoaderFrame-data.html b/LayoutTests/http/tests/xmlhttprequest/resources/docLoaderFrame-data.html
new file mode 100644 (file)
index 0000000..4f009d5
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title></title>
+        <style type="text/css" media="screen">@import "/include/css/mainstyles.css";</style>
+    </head>
+    <body></body>
+</html>