Bug 1318833 - Part 1: Remove Silverlight plugin tests and test plugin. r=qdot
authorChris Peterson <cpeterson@mozilla.com>
Mon, 21 Nov 2016 21:10:27 -0800
changeset 323778 fc3a99e3d24a8653ab66ac2efffaedbf63096a1f
parent 323777 f4cac94feb53415a51d9966dd60b1ccdecc43c36
child 323779 138abd270223714144ab8010e80499909980e406
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersqdot
bugs1318833
milestone53.0a1
Bug 1318833 - Part 1: Remove Silverlight plugin tests and test plugin. r=qdot
dom/plugins/test/mochitest/test_bug1165981.html
dom/plugins/test/testaddon/Makefile.in
dom/plugins/test/testplugin/moz.build
dom/plugins/test/testplugin/silverlightplugin/Info.plist
dom/plugins/test/testplugin/silverlightplugin/moz.build
dom/plugins/test/testplugin/silverlightplugin/nptest.def
dom/plugins/test/testplugin/silverlightplugin/nptest.rc
dom/plugins/test/testplugin/silverlightplugin/nptest_name.cpp
python/mozbuild/mozbuild/action/test_archive.py
--- a/dom/plugins/test/mochitest/test_bug1165981.html
+++ b/dom/plugins/test/mochitest/test_bug1165981.html
@@ -6,17 +6,16 @@
     <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, "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;
             }
@@ -40,41 +39,33 @@
           obj.id = id;
           obj.width = 200;
           obj.height = 200;
           document.body.appendChild(obj);
       }
 
       function run() {
         createNode("plugin-flash", "application/x-shockwave-flash-test");
-        createNode("plugin-silverlight", "application/x-silverlight-test");
         createNode("disallowedPlugin", "application/x-third-test");
         var pluginElement = document.getElementById("plugin-flash");
         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["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("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'");
-        ok(findMimeType("application/x-silverlight-test"), "Should have found a MIME type named 'application/x-silverlight-test'");
         ok(!findMimeType("application/x-third-test"), "Should NOT have found a disallowed MIME type named 'application/x-third-test'");
 
         SimpleTest.finish();
       }
     </script>
 
   <body onload="run()">
   </body>
--- a/dom/plugins/test/testaddon/Makefile.in
+++ b/dom/plugins/test/testaddon/Makefile.in
@@ -1,19 +1,19 @@
 # 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/.
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-plugin_file_names = Test.plugin SecondTest.plugin ThirdTest.plugin npswftest.plugin npctrltest.plugin
+plugin_file_names = Test.plugin SecondTest.plugin ThirdTest.plugin npswftest.plugin
 addon_file_name = testaddon_$(TARGET_XPCOM_ABI).xpi
 else
-plugin_file_names = $(DLL_PREFIX)nptest$(DLL_SUFFIX) $(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) $(DLL_PREFIX)npthirdtest$(DLL_SUFFIX) $(DLL_PREFIX)npswftest$(DLL_SUFFIX) $(DLL_PREFIX)npctrltest$(DLL_SUFFIX)
+plugin_file_names = $(DLL_PREFIX)nptest$(DLL_SUFFIX) $(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) $(DLL_PREFIX)npthirdtest$(DLL_SUFFIX) $(DLL_PREFIX)npswftest$(DLL_SUFFIX)
 addon_file_name = testaddon.xpi
 endif
 
 # This is so hacky. Waiting on bug 988938.
 testdir = $(topobjdir)/_tests/xpcshell/dom/plugins/test/unit/
 addonpath = $(testdir)/$(addon_file_name)
 
 ifdef COMPILE_ENVIRONMENT
--- a/dom/plugins/test/testplugin/moz.build
+++ b/dom/plugins/test/testplugin/moz.build
@@ -1,13 +1,13 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
-DIRS += ['secondplugin', 'javaplugin', 'thirdplugin', 'flashplugin', 'silverlightplugin']
+DIRS += ['secondplugin', 'javaplugin', 'thirdplugin', 'flashplugin']
 
 SharedLibrary('nptest')
 
 relative_path = '.'
 cocoa_name = 'Test'
 include('testplugin.mozbuild')
deleted file mode 100644
--- a/dom/plugins/test/testplugin/silverlightplugin/Info.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>libnpctrltest.dylib</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.mozilla.SilverlightTestPlugin</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>BRPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0.0.0</string>
-	<key>CFBundleSignature</key>
-	<string>SILVERLIGHTTEST</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.0.0</string>
-	<key>WebPluginName</key>
-	<string>Silverlight Test Plug-in</string>
-	<key>WebPluginDescription</key>
-	<string>Silverlight plug-in for testing purposes.</string>
-	<key>WebPluginMIMETypes</key>
-	<dict>
-		<key>application/x-silverlight-test</key>
-		<dict>
-			<key>WebPluginExtensions</key>
-			<array>
-				<string>xaml</string>
-			</array>
-			<key>WebPluginTypeDescription</key>
-			<string>Silverlight test type</string>
-		</dict>
-	</dict>
-</dict>
-</plist>
deleted file mode 100644
--- a/dom/plugins/test/testplugin/silverlightplugin/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-SharedLibrary('npctrltest')
-
-relative_path = 'silverlightplugin'
-cocoa_name = 'npctrltest'
-include('../testplugin.mozbuild')
deleted file mode 100644
--- a/dom/plugins/test/testplugin/silverlightplugin/nptest.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY   NPCTRLTEST
-
-EXPORTS
-  NP_GetEntryPoints     @1
-  NP_Initialize         @2
-  NP_Shutdown           @3
-  NP_GetMIMEDescription @4
deleted file mode 100644
--- a/dom/plugins/test/testplugin/silverlightplugin/nptest.rc
+++ /dev/null
@@ -1,42 +0,0 @@
-#include<winver.h>
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION    1,0,0,0
- PRODUCTVERSION 1,0,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "CompanyName", "mozilla.org"
-            VALUE "FileDescription", L"Silverlight plug-in for testing purposes."
-            VALUE "FileExtents", "xaml"
-            VALUE "FileOpenName", "Silverlight test type"
-            VALUE "FileVersion", "1.0"
-            VALUE "InternalName", "npctrltest"
-            VALUE "MIMEType", "application/x-silverlight-test"
-            VALUE "OriginalFilename", "npctrltest.dll"
-            VALUE "ProductName", "Silverlight Test Plug-in"
-            VALUE "ProductVersion", "1.0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
deleted file mode 100644
--- a/dom/plugins/test/testplugin/silverlightplugin/nptest_name.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 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 = "Silverlight Test Plug-in";
-const char *sPluginDescription = "Silverlight plug-in for testing purposes.";
-const char *sMimeDescription = "application/x-silverlight-test:xaml:Silverlight test type";
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -46,30 +46,28 @@ TEST_HARNESS_BINS = [
 
 # The fileid utility depends on mozglue. See bug 1069556.
 TEST_HARNESS_DLLS = [
     'crashinjectdll',
     'mozglue'
 ]
 
 TEST_PLUGIN_DLLS = [
-    'npctrltest',
     'npsecondtest',
     'npswftest',
     'nptest',
     'nptestjava',
     'npthirdtest',
 ]
 
 TEST_PLUGIN_DIRS = [
     'JavaTest.plugin/**',
     'SecondTest.plugin/**',
     'Test.plugin/**',
     'ThirdTest.plugin/**',
-    'npctrltest.plugin/**',
     'npswftest.plugin/**',
 ]
 
 GMP_TEST_PLUGIN_DIRS = [
     'gmp-clearkey/**',
     'gmp-fake/**',
     'gmp-fakeopenh264/**',
 ]