[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jianli at chromium.org jianli at chromium.org
Wed Dec 22 12:57:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7052e492322b08c286fc7939c10ed7eef00a81bb
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 2 23:14:50 2010 +0000

    Improve tests for blob URL.
    https://bugs.webkit.org/show_bug.cgi?id=45132
    
    Reviewed by Darin Fisher.
    
    Change apply-blob-url-to-xhr.html to produce text based result. Also
    add the test case for revokeBlobURL in apply-blob-url-to-xhr.html
    and work-apply-blob-url-to-xhr.html.
    
    * fast/files/apply-blob-url-to-img-expected.txt: Added.
    * fast/files/apply-blob-url-to-img.html:
    * fast/files/apply-blob-url-to-xhr-expected.txt:
    * fast/files/apply-blob-url-to-xhr.html:
    * fast/files/workers/resources/worker-apply-blob-url-to-xhr.js:
    (sendXMLHttpRequest):
    (onmessage):
    * fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt:
    * platform/chromium/test_expectations.txt:
    * platform/mac/Skipped:
    * platform/mac/fast/files/apply-blob-url-to-img-expected.checksum: Removed.
    * platform/mac/fast/files/apply-blob-url-to-img-expected.png: Removed.
    * platform/mac/fast/files/apply-blob-url-to-img-expected.txt: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 274a332..849447c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,28 @@
+2010-09-02  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Improve tests for blob URL.
+        https://bugs.webkit.org/show_bug.cgi?id=45132
+
+        Change apply-blob-url-to-xhr.html to produce text based result. Also
+        add the test case for revokeBlobURL in apply-blob-url-to-xhr.html
+        and work-apply-blob-url-to-xhr.html.
+
+        * fast/files/apply-blob-url-to-img-expected.txt: Added.
+        * fast/files/apply-blob-url-to-img.html:
+        * fast/files/apply-blob-url-to-xhr-expected.txt:
+        * fast/files/apply-blob-url-to-xhr.html:
+        * fast/files/workers/resources/worker-apply-blob-url-to-xhr.js:
+        (sendXMLHttpRequest):
+        (onmessage):
+        * fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt:
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/Skipped:
+        * platform/mac/fast/files/apply-blob-url-to-img-expected.checksum: Removed.
+        * platform/mac/fast/files/apply-blob-url-to-img-expected.png: Removed.
+        * platform/mac/fast/files/apply-blob-url-to-img-expected.txt: Removed.
+
 2010-09-02  Adam Langley  <agl at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/files/apply-blob-url-to-img-expected.txt b/LayoutTests/fast/files/apply-blob-url-to-img-expected.txt
new file mode 100644
index 0000000..cfc6e08
--- /dev/null
+++ b/LayoutTests/fast/files/apply-blob-url-to-img-expected.txt
@@ -0,0 +1,5 @@
+ 
+Old image: 0 x 0
+New image: 76 x 103
+DONE
+
diff --git a/LayoutTests/fast/files/apply-blob-url-to-img.html b/LayoutTests/fast/files/apply-blob-url-to-img.html
index 617cadb..e81a95f 100644
--- a/LayoutTests/fast/files/apply-blob-url-to-img.html
+++ b/LayoutTests/fast/files/apply-blob-url-to-img.html
@@ -6,10 +6,27 @@
 <pre id='console'></pre>
 
 <script>
-function onInputFileChange(file)
+function log(message)
+{
+    document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
+}
+
+function onInputFileChange()
 {
     var file = document.getElementById("file").files[0];
-    document.getElementById('imgToReplace').src = window.createBlobURL(file);
+    var img = document.getElementById('imgToReplace');
+    log("Old image: " + img.width + " x " + img.height);
+    img.onload = onImgLoad;
+    img.src = window.createBlobURL(file);
+}
+
+function onImgLoad()
+{
+    var img = document.getElementById('imgToReplace');
+    log("New image: " + img.width + " x " + img.height);
+    log("DONE");
+    if (layoutTestController.notifyDone)
+        layoutTestController.notifyDone();
 }
 
 function runTests()
@@ -20,6 +37,8 @@ function runTests()
 }
 
 if (window.eventSender) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
     window.onload = runTests;
 }
 </script>
diff --git a/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt b/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
index a24c719..d994072 100644
--- a/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
+++ b/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
@@ -1,8 +1,11 @@
 
 Test that XMLHttpRequest GET succeeds.
-Hello
+Status: 200
+Response: Hello
 Test that XMLHttpRequest POST fails.
 Received exception 101: NETWORK_ERR
-
+Test that XMLHttpRequest GET fails after the blob URL is revoked.
+Status: 404
+Response: 
 DONE
 
diff --git a/LayoutTests/fast/files/apply-blob-url-to-xhr.html b/LayoutTests/fast/files/apply-blob-url-to-xhr.html
index 6a74c3d..e163d51 100644
--- a/LayoutTests/fast/files/apply-blob-url-to-xhr.html
+++ b/LayoutTests/fast/files/apply-blob-url-to-xhr.html
@@ -10,26 +10,33 @@ function log(message)
     document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
 }
 
-function onInputFileChange(file)
+function sendXMLHttpRequest(method, url)
 {
-    var file = document.getElementById("file").files[0];
-    var fileURL = window.createBlobURL(file);
-
-    log("Test that XMLHttpRequest GET succeeds.");
     var xhr = new XMLHttpRequest();
-    xhr.open("GET", fileURL, false);
-    xhr.send();
-    log(xhr.responseText);
-
-    log("Test that XMLHttpRequest POST fails.");
-    xhr = new XMLHttpRequest();
-    xhr.open("POST", fileURL, false);
+    xhr.open(method, url, false);
     try {
         xhr.send();
+        log("Status: " + xhr.status);
+        log("Response: " + xhr.responseText);
     } catch (error) {
         log("Received exception " + error.code + ": " + error.name);
     }
-    log(xhr.responseText);
+}
+
+function onInputFileChange()
+{
+    var file = document.getElementById("file").files[0];
+    var fileURL = window.createBlobURL(file);
+
+    log("Test that XMLHttpRequest GET succeeds.");
+    sendXMLHttpRequest("GET", fileURL);
+
+    log("Test that XMLHttpRequest POST fails.");
+    sendXMLHttpRequest("POST", fileURL);
+
+    log("Test that XMLHttpRequest GET fails after the blob URL is revoked.");
+    window.revokeBlobURL(fileURL);
+    sendXMLHttpRequest("GET", fileURL);
 
     log("DONE");
     if (layoutTestController.notifyDone)
diff --git a/LayoutTests/fast/files/workers/resources/worker-apply-blob-url-to-xhr.js b/LayoutTests/fast/files/workers/resources/worker-apply-blob-url-to-xhr.js
index 60e302d..62904e5 100644
--- a/LayoutTests/fast/files/workers/resources/worker-apply-blob-url-to-xhr.js
+++ b/LayoutTests/fast/files/workers/resources/worker-apply-blob-url-to-xhr.js
@@ -3,26 +3,34 @@ function log(message)
     postMessage(message);
 }
 
+function sendXMLHttpRequest(method, url)
+{
+    var xhr = new XMLHttpRequest();
+    xhr.open(method, url, false);
+    try {
+        xhr.send();
+        log("Status: " + xhr.status);
+        log("Response: " + xhr.responseText);
+    } catch (error) {
+        log("Received exception " + error.code + ": " + error.name);
+    }
+}
+
 onmessage = function(event)
 {
     var file = event.data;
     var fileURL = createBlobURL(file);
 
     log("Test that XMLHttpRequest GET succeeds.");
-    var xhr = new XMLHttpRequest();
-    xhr.open("GET", fileURL, false);
-    xhr.send();
-    log(xhr.responseText);
+    sendXMLHttpRequest("GET", fileURL);
 
     log("Test that XMLHttpRequest POST fails.");
     xhr = new XMLHttpRequest();
-    xhr.open("POST", fileURL, false);
-    try {
-        xhr.send();
-    } catch (error) {
-        log("Received exception " + error.code + ": " + error.name);
-    }
-    log(xhr.responseText);
+    sendXMLHttpRequest("POST", fileURL);
+
+    log("Test that XMLHttpRequest GET fails after the blob URL is revoked.");
+    revokeBlobURL(fileURL);
+    sendXMLHttpRequest("GET", fileURL);
 
     log("DONE");
 }
diff --git a/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt b/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
index a24c719..d994072 100644
--- a/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
+++ b/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
@@ -1,8 +1,11 @@
 
 Test that XMLHttpRequest GET succeeds.
-Hello
+Status: 200
+Response: Hello
 Test that XMLHttpRequest POST fails.
 Received exception 101: NETWORK_ERR
-
+Test that XMLHttpRequest GET fails after the blob URL is revoked.
+Status: 404
+Response: 
 DONE
 
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index a4895c4..8efd54c 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3128,9 +3128,6 @@ BUG47946 WIN LINUX MAC : scrollbars/custom-scrollbar-with-incomplete-style.html
 // Doesn't apply to Chromium (QuickTime-specific behavior)
 WONTFIX SKIP : media/video-does-not-loop.html = TIMEOUT
 
-// Need rebaseline
-BUGJIANLI : fast/files/apply-blob-url-to-img.html = IMAGE+TEXT
-
 // Passes in Chromium DRT.
 BUGWK44961 : fast/notifications/notifications-click-event.html = TIMEOUT
 
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 3980771..14c72fb 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -299,6 +299,3 @@ inspector/dom-breakpoints.html
 # Safari doesn't allow to customize outermost scrollbars.
 # https://bugs.webkit.org/show_bug.cgi?id=43960
 scrollbars/custom-scrollbar-with-incomplete-style.html
-
-# Need to get the right result.
-fast/files/apply-blob-url-to-img.html
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.checksum b/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.checksum
deleted file mode 100644
index 5ae583f..0000000
--- a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.checksum
+++ /dev/null
@@ -1 +0,0 @@
-7740b21739fb6ed55a8b44322626aafa
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.png b/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.png
deleted file mode 100644
index d9f5865..0000000
Binary files a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.txt b/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.txt
deleted file mode 100644
index 684a3bf..0000000
--- a/LayoutTests/platform/mac/fast/files/apply-blob-url-to-img-expected.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x131
-  RenderBlock {HTML} at (0,0) size 800x131
-    RenderBody {BODY} at (8,8) size 784x110
-      RenderBlock (anonymous) at (0,0) size 784x110
-        RenderFileUploadControl {INPUT} at (2,90) size 237x18 "abe.png"
-          RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
-            RenderBlock (anonymous) at (8,2) size 62x13
-              RenderText at (0,0) size 62x13
-                text run at (0,0) width 62: "Choose File"
-        RenderText {#text} at (241,89) size 4x18
-          text run at (241,89) width 4: " "
-        RenderImage {IMG} at (245,0) size 76x103
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {PRE} at (0,123) size 784x0

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list