Bug 1293062 test fixup: name the Flash nptest plugin "Shockwave Flash" so that it passes for Flash during tests.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 26 Aug 2016 15:49:08 -0400
changeset 407625 fdf0f27af56b0ebcfece8ff25136048616e3b723
parent 407624 8ca77a9ae536d9593fbb7899b2ba5eaa13abf0a7
child 407626 75ab2126e8087b538868ecf9439c7f9163bce9f3
push id27999
push usercykesiopka.bmo@gmail.com
push dateTue, 30 Aug 2016 17:35:37 +0000
bugs1293062
milestone51.0a1
Bug 1293062 test fixup: name the Flash nptest plugin "Shockwave Flash" so that it passes for Flash during tests. MozReview-Commit-ID: 7kou5izPgmU
dom/plugins/test/mochitest/test_bug1165981.html
dom/plugins/test/testplugin/flashplugin/Info.plist
dom/plugins/test/testplugin/flashplugin/nptest.rc
dom/plugins/test/testplugin/flashplugin/nptest_name.cpp
--- a/dom/plugins/test/mochitest/test_bug1165981.html
+++ b/dom/plugins/test/mochitest/test_bug1165981.html
@@ -5,17 +5,17 @@
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     <script type="text/javascript" src="plugin-utils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   </head>
     <script class="testbody" type="application/javascript">
       "use strict";
 
       SimpleTest.waitForExplicitFinish();
-      ok(SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Flash Test Plug-in"), "Should find allowed test flash plugin");
+      ok(SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Shockwave Flash"), "Should find allowed test flash plugin");
       ok(SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Silverlight Test Plug-in"), "Should find allowed test silverlight plugin");
       ok(!SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Third Test Plug-in"), "Should not find disallowed plugin");
 
       function findPlugin(pluginName) {
           for (var i = 0; i < navigator.plugins.length; i++) {
             var plugin = navigator.plugins[i];
             if (plugin.name === pluginName) {
               return plugin;
@@ -51,21 +51,21 @@
         is(pluginElement.identifierToStringTest("foo"), "foo", "Should be able to call a function provided by the plugin");
 
         pluginElement = document.getElementById("plugin-silverlight");
         is(pluginElement.identifierToStringTest("foo"), "foo", "Should be able to call a function provided by the plugin");
 
         pluginElement = document.getElementById("disallowedPlugin");
         is(typeof pluginElement.identifierToStringTest, "undefined", "Should NOT be able to call a function on a disallowed plugin");
 
-        ok(navigator.plugins["Flash Test Plug-in"], "Should have queried a plugin named 'Flash Test Plug-in'");
+        ok(navigator.plugins["Shockwave Flash"], "Should have queried a plugin named 'Shockwave Flash'");
         ok(navigator.plugins["Silverlight Test Plug-in"], "Should have queried a plugin named 'Silverlight Test Plug-in'");
         ok(!navigator.plugins["Third Test Plug-in"], "Should NOT have queried a disallowed plugin named 'Third Test Plug-in'");
 
-        ok(findPlugin("Flash Test Plug-in"), "Should have found a plugin named 'Flash Test Plug-in'");
+        ok(findPlugin("Shockwave Flash"), "Should have found a plugin named 'Shockwave Flash'");
         ok(findPlugin("Silverlight Test Plug-in"), "Should have found a plugin named 'Silverlight Test Plug-in'");
         ok(!findPlugin("Third Test Plug-in"), "Should NOT found a disallowed plugin named 'Third Test Plug-in'");
 
         ok(navigator.mimeTypes["application/x-shockwave-flash-test"], "Should have queried a MIME type named 'application/x-shockwave-flash-test'");
         ok(navigator.mimeTypes["application/x-silverlight-test"], "Should have queried a MIME type named 'application/x-silverlight-test'");
         ok(!navigator.mimeTypes["application/x-third-test"], "Should NOT have queried a disallowed type named 'application/x-third-test'");
 
         ok(findMimeType("application/x-shockwave-flash-test"), "Should have found a MIME type named 'application/x-shockwave-flash-test'");
--- a/dom/plugins/test/testplugin/flashplugin/Info.plist
+++ b/dom/plugins/test/testplugin/flashplugin/Info.plist
@@ -14,17 +14,17 @@
 	<string>BRPL</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0.0.0</string>
 	<key>CFBundleSignature</key>
 	<string>FLASHTEST</string>
 	<key>CFBundleVersion</key>
 	<string>1.0.0.0</string>
 	<key>WebPluginName</key>
-	<string>Flash Test Plug-in</string>
+	<string>Shockwave Flash</string>
 	<key>WebPluginDescription</key>
 	<string>Flash plug-in for testing purposes.</string>
 	<key>WebPluginMIMETypes</key>
 	<dict>
 		<key>application/x-shockwave-flash-test</key>
 		<dict>
 			<key>WebPluginExtensions</key>
 			<array>
--- a/dom/plugins/test/testplugin/flashplugin/nptest.rc
+++ b/dom/plugins/test/testplugin/flashplugin/nptest.rc
@@ -26,17 +26,17 @@ BEGIN
             VALUE "CompanyName", "mozilla.org"
             VALUE "FileDescription", L"Flash plug-in for testing purposes."
             VALUE "FileExtents", "swf"
             VALUE "FileOpenName", "Flash test type"
             VALUE "FileVersion", "1.0"
             VALUE "InternalName", "npswftest"
             VALUE "MIMEType", "application/x-shockwave-flash-test"
             VALUE "OriginalFilename", "npswftest.dll"
-            VALUE "ProductName", "Flash Test Plug-in"
+            VALUE "ProductName", "Shockwave Flash"
             VALUE "ProductVersion", "1.0"
         END
     END
     BLOCK "VarFileInfo"
     BEGIN
         VALUE "Translation", 0x409, 1252
     END
 END
--- a/dom/plugins/test/testplugin/flashplugin/nptest_name.cpp
+++ b/dom/plugins/test/testplugin/flashplugin/nptest_name.cpp
@@ -1,7 +1,7 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const char *sPluginName = "Flash Test Plug-in";
+const char *sPluginName = "Shockwave Flash";
 const char *sPluginDescription = "Flash plug-in for testing purposes.";
 const char *sMimeDescription = "application/x-shockwave-flash-test:swf:Flash test type";