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

tony at chromium.org tony at chromium.org
Wed Dec 22 15:29:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 99d0f9332465e34c1d2bf995185c81886f653cfe
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 21:35:50 2010 +0000

    2010-11-04  Tony Chang  <tony at chromium.org>
    
            Reviewed by Adam Barth.
    
            handle plugins without mimetypes in fast/js/navigator-mimeTypes-length.html
            https://bugs.webkit.org/show_bug.cgi?id=49015
    
            This test was added in r15573 to verify that navigator.mimeTypes.length
            returns the number of mimeTypes provided by plugins.  However, it assumes
            that there are more mimeTypes handled than plugins installed.  It's
            possible for a plugin to handle no mime types, so this invariant isn't
            true.  This often works on Win/Mac because they have a plugin that handles
            multimedia files (like QuickTime), but on Linux, often there are no plugins
            installed other than the test plugin (which handles 1 mime type).
    
            Instead, add up the mime types from each plugin and verify that it
            matches navigator.mimeTypes.length.
    
            * fast/js/navigator-mimeTypes-length-expected.txt:
            * fast/js/script-tests/navigator-mimeTypes-length.js:
            * platform/google-chrome-linux32/fast/js/navigator-mimeTypes-length-expected.txt: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71357 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2481168..933f896 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,28 @@
 
         Reviewed by Adam Barth.
 
+        handle plugins without mimetypes in fast/js/navigator-mimeTypes-length.html
+        https://bugs.webkit.org/show_bug.cgi?id=49015
+
+        This test was added in r15573 to verify that navigator.mimeTypes.length
+        returns the number of mimeTypes provided by plugins.  However, it assumes
+        that there are more mimeTypes handled than plugins installed.  It's
+        possible for a plugin to handle no mime types, so this invariant isn't
+        true.  This often works on Win/Mac because they have a plugin that handles
+        multimedia files (like QuickTime), but on Linux, often there are no plugins
+        installed other than the test plugin (which handles 1 mime type).
+
+        Instead, add up the mime types from each plugin and verify that it
+        matches navigator.mimeTypes.length.
+
+        * fast/js/navigator-mimeTypes-length-expected.txt:
+        * fast/js/script-tests/navigator-mimeTypes-length.js:
+        * platform/google-chrome-linux32/fast/js/navigator-mimeTypes-length-expected.txt: Removed.
+
+2010-11-04  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Adam Barth.
+
         make plugins/update-widgets-crash.html resilient to multiple calls to NPP_SetWindow
         https://bugs.webkit.org/show_bug.cgi?id=49013
 
diff --git a/LayoutTests/fast/js/navigator-mimeTypes-length-expected.txt b/LayoutTests/fast/js/navigator-mimeTypes-length-expected.txt
index 5abb240..e86d840 100644
--- a/LayoutTests/fast/js/navigator-mimeTypes-length-expected.txt
+++ b/LayoutTests/fast/js/navigator-mimeTypes-length-expected.txt
@@ -3,7 +3,7 @@ Test for bug 10038: REGRESSION: Length of navigator.mimeTypes collection returns
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS navigator.mimeTypes.length > navigator.plugins.length is true
+PASS navigator.mimeTypes.length == numberOfMimeTypes is true
 PASS navigator.mimeTypes[navigator.mimeTypes.length+1] is undefined
 PASS successfullyParsed is true
 
diff --git a/LayoutTests/fast/js/script-tests/navigator-mimeTypes-length.js b/LayoutTests/fast/js/script-tests/navigator-mimeTypes-length.js
index 3b34579..09eb2f6 100644
--- a/LayoutTests/fast/js/script-tests/navigator-mimeTypes-length.js
+++ b/LayoutTests/fast/js/script-tests/navigator-mimeTypes-length.js
@@ -2,7 +2,13 @@ description(
 "Test for bug 10038: REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number of registered mime types."
 );
 
-shouldBeTrue("navigator.mimeTypes.length > navigator.plugins.length");
+var numberOfMimeTypes = 0;
+for (var i = 0; i < navigator.plugins.length; ++i) {
+    var plugin = navigator.plugins[i];
+    numberOfMimeTypes += plugin.length;
+}
+
+shouldBeTrue("navigator.mimeTypes.length == numberOfMimeTypes");
 shouldBe("navigator.mimeTypes[navigator.mimeTypes.length+1]", "undefined");
 
 successfullyParsed = true;
diff --git a/LayoutTests/platform/google-chrome-linux32/fast/js/navigator-mimeTypes-length-expected.txt b/LayoutTests/platform/google-chrome-linux32/fast/js/navigator-mimeTypes-length-expected.txt
deleted file mode 100644
index 5abb240..0000000
--- a/LayoutTests/platform/google-chrome-linux32/fast/js/navigator-mimeTypes-length-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Test for bug 10038: REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number of registered mime types.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS navigator.mimeTypes.length > navigator.plugins.length is true
-PASS navigator.mimeTypes[navigator.mimeTypes.length+1] is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list