Bug 1314955 part B - Remove the tests for binary-component which is no longer supported. r?froydnj draft
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 26 Oct 2016 11:34:32 -0400
changeset 433337 6ec1776eba6ec1ca3e6c3e4b8bebfeddc5d84ecd
parent 433336 a5f8a8cf9b83f14cbdb1efbddbbfb0a6219cd7e0
child 433338 35ad716e3249e8776bb599c59723b521760bbb5c
push id34547
push userbsmedberg@mozilla.com
push dateThu, 03 Nov 2016 14:53:47 +0000
reviewersfroydnj
bugs1314955
milestone52.0a1
Bug 1314955 part B - Remove the tests for binary-component which is no longer supported. r?froydnj MozReview-Commit-ID: G7MATc8AGt1
xpcom/tests/bug656331_component/TestComponent.cpp
xpcom/tests/bug656331_component/bug656331.manifest
xpcom/tests/bug656331_component/moz.build
xpcom/tests/component/TestComponent.cpp
xpcom/tests/component/moz.build
xpcom/tests/component/testcomponent.manifest
xpcom/tests/component_no_aslr/Makefile.in
xpcom/tests/component_no_aslr/TestComponent.cpp
xpcom/tests/component_no_aslr/moz.build
xpcom/tests/component_no_aslr/testcompnoaslr.manifest
xpcom/tests/moz.build
xpcom/tests/unit/test_comp_no_aslr.js
xpcom/tests/unit/test_compmgr_warnings.js
xpcom/tests/unit/xpcshell.ini
deleted file mode 100644
--- a/xpcom/tests/bug656331_component/TestComponent.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "mozilla/ModuleUtils.h"
-
-// f18fb09b-28b4-4435-bc5b-8027f18df743
-#define NS_TESTING_CID \
-{ 0xf18fb09b, 0x28b4, 0x4435, \
-  { 0xbc, 0x5b, 0x80, 0x27, 0xf1, 0x8d, 0xf7, 0x43 } }
-
-NS_DEFINE_NAMED_CID(NS_TESTING_CID);
-
-static nsresult
-DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
-  { nullptr }
-};
-
-static const mozilla::Module kTestModule = {
-  3, /* faking mozilla::Module::kVersion with a value that will never be used */
-  kTestCIDs
-};
-
-NSMODULE_DEFN(dummy) = &kTestModule;
deleted file mode 100644
--- a/xpcom/tests/bug656331_component/bug656331.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-#filter substitution
-binary-component @LIBRARY_FILENAME@
deleted file mode 100644
--- a/xpcom/tests/bug656331_component/moz.build
+++ /dev/null
@@ -1,26 +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/.
-
-FINAL_TARGET = '_tests/xpcshell/xpcom/tests/unit'
-EXTRA_PP_COMPONENTS += [
-    'bug656331.manifest',
-]
-
-SOURCES += [
-    'TestComponent.cpp',
-]
-
-XPCOMBinaryComponent('test656331')
-
-DEFINES['LIBRARY_FILENAME'] = '%s%s%s' % (
-    CONFIG['DLL_PREFIX'],
-    LIBRARY_NAME,
-    CONFIG['DLL_SUFFIX']
-)
-
-# Need to link with CoreFoundation on Mac
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    OS_LIBS += CONFIG['TK_LIBS']
deleted file mode 100644
--- a/xpcom/tests/component/TestComponent.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "mozilla/ModuleUtils.h"
-
-#define NS_TESTING_CID \
-{ 0x335fb596, 0xe52d, 0x418f, \
-  { 0xb0, 0x1c, 0x1b, 0xf1, 0x6c, 0xe5, 0xe7, 0xe4 } }
-#define NS_NONEXISTENT_CID \
-{ 0x1e61fb15, 0xead4, 0x45cd, \
-  { 0x80, 0x13, 0x40, 0x99, 0xa7, 0x10, 0xa2, 0xfa } }
-
-NS_DEFINE_NAMED_CID(NS_TESTING_CID);
-NS_DEFINE_NAMED_CID(NS_NONEXISTENT_CID);
-
-static nsresult
-DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
-  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
-  { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kTestContractIDs[] = {
-  { "@testing/foo", &kNS_NONEXISTENT_CID },
-  { nullptr }
-};
-
-static const mozilla::Module kTestModule = {
-  mozilla::Module::kVersion,
-  kTestCIDs,
-  kTestContractIDs
-};
-
-NSMODULE_DEFN(dummy) = &kTestModule;
-
-  
deleted file mode 100644
--- a/xpcom/tests/component/moz.build
+++ /dev/null
@@ -1,26 +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/.
-
-FINAL_TARGET = '_tests/xpcshell/xpcom/tests/unit'
-EXTRA_PP_COMPONENTS += [
-    'testcomponent.manifest',
-]
-
-SOURCES += [
-    'TestComponent.cpp',
-]
-
-XPCOMBinaryComponent('testcomponent')
-
-DEFINES['LIBRARY_FILENAME'] = '%s%s%s' % (
-    CONFIG['DLL_PREFIX'],
-    LIBRARY_NAME,
-    CONFIG['DLL_SUFFIX']
-)
-
-# Need to link with CoreFoundation on Mac
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    OS_LIBS += CONFIG['TK_LIBS']
deleted file mode 100644
--- a/xpcom/tests/component/testcomponent.manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-#filter substitution
-binary-component @LIBRARY_FILENAME@
-binary-component @LIBRARY_FILENAME@
-binary-component @LIBRARY_FILENAME@
deleted file mode 100644
--- a/xpcom/tests/component_no_aslr/Makefile.in
+++ /dev/null
@@ -1,8 +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/.
-
-include $(topsrcdir)/config/rules.mk
-
-LDFLAGS := $(filter-out -DYNAMICBASE,$(LDFLAGS)) -DYNAMICBASE:NO
deleted file mode 100644
--- a/xpcom/tests/component_no_aslr/TestComponent.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "mozilla/ModuleUtils.h"
-
-#define NS_TESTING_CID \
-{ 0x335fb596, 0xe52d, 0x418f, \
-  { 0xb0, 0x1c, 0x1b, 0xf1, 0x6c, 0xe5, 0xe7, 0xe4 } }
-
-NS_DEFINE_NAMED_CID(NS_TESTING_CID);
-
-static nsresult
-DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
-  { nullptr }
-};
-
-static const mozilla::Module kTestModule = {
-  mozilla::Module::kVersion,
-  kTestCIDs
-};
-
-NSMODULE_DEFN(dummy) = &kTestModule;
-
-  
deleted file mode 100644
--- a/xpcom/tests/component_no_aslr/moz.build
+++ /dev/null
@@ -1,26 +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/.
-
-FINAL_TARGET = '_tests/xpcshell/xpcom/tests/unit'
-EXTRA_PP_COMPONENTS += [
-    'testcompnoaslr.manifest',
-]
-
-SOURCES += [
-    'TestComponent.cpp',
-]
-
-XPCOMBinaryComponent('testcompnoaslr')
-
-DEFINES['LIBRARY_FILENAME'] = '%s%s%s' % (
-    CONFIG['DLL_PREFIX'],
-    LIBRARY_NAME,
-    CONFIG['DLL_SUFFIX']
-)
-
-# Need to link with CoreFoundation on Mac
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    OS_LIBS += CONFIG['TK_LIBS']
deleted file mode 100644
--- a/xpcom/tests/component_no_aslr/testcompnoaslr.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-#filter substitution
-binary-component @LIBRARY_FILENAME@
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -1,19 +1,16 @@
 # -*- 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/.
 
 TEST_DIRS += [
     'external',
-    'component',
-    'bug656331_component',
-    'component_no_aslr',
     'gtest',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     TEST_DIRS += ['windows']
 
 EXPORTS.testing += [
     'TestHarness.h',
deleted file mode 100644
--- a/xpcom/tests/unit/test_comp_no_aslr.js
+++ /dev/null
@@ -1,18 +0,0 @@
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-function run_test() {
-  let manifest = do_get_file('components/testcompnoaslr.manifest');
-  registerAppManifest(manifest);
-  var sysInfo = Cc["@mozilla.org/system-info;1"].
-                getService(Ci.nsIPropertyBag2);
-  var ver = parseFloat(sysInfo.getProperty("version"));
-  if (ver < 6.0) {
-    // This is disabled on pre-Vista OSs.
-    do_check_true("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
-  } else {
-    do_check_false("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
-  }
-}
deleted file mode 100644
--- a/xpcom/tests/unit/test_compmgr_warnings.js
+++ /dev/null
@@ -1,71 +0,0 @@
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-function info(s) {
-  dump("TEST-INFO | test_compmgr_warnings.js | " + s + "\n");
-}
-
-var gMessagesExpected = [
-  { line: 2, message: /Malformed CID/, found: false },
-  { line: 6, message: /re-register/, found: false },
-  { line: 9, message: /Could not/, found: false },
-  { line: 2, message: /binary component twice/, found: false },
-  { line: 3, message: /binary component twice/, found: false },
-];
-
-const kConsoleListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIConsoleListener]),
-
-  observe: function listener_observe(message) {
-    if (!(message instanceof Ci.nsIScriptError)) {
-      info("Not a script error: " + message.message);
-      return;
-    }
-
-    info("Script error... " + message.sourceName + ":" + message.lineNumber + ": " + message.errorMessage);
-    for (let expected of gMessagesExpected) {
-      if (message.lineNumber != expected.line)
-        continue;
-
-      if (!expected.message.test(message.errorMessage))
-        continue;
-
-      info("Found expected message: " + expected.message);
-      do_check_false(expected.found);
-                
-      expected.found = true;
-    }
-  }
-};
-
-function run_deferred_event(fn) {
-  do_test_pending();
-  Components.classes["@mozilla.org/thread-manager;1"].
-    getService(Ci.nsIThreadManager).mainThread.dispatch(function() {
-      fn();
-      do_test_finished();
-    }, 0);
-}
-
-function run_test()
-{
-  let cs = Components.classes["@mozilla.org/consoleservice;1"].
-    getService(Ci.nsIConsoleService);
-  cs.registerListener(kConsoleListener);
-
-  var manifest = do_get_file('compmgr_warnings.manifest');
-  registerAppManifest(manifest);
-  manifest = do_get_file('components/testcomponent.manifest');
-  registerAppManifest(manifest);
-
-  run_deferred_event(function() {
-    cs.unregisterListener(kConsoleListener);
-
-    for (let expected of gMessagesExpected) {
-      info("checking " + expected.message);
-      do_check_true(expected.found);
-    }
-  });
-}
--- a/xpcom/tests/unit/xpcshell.ini
+++ b/xpcom/tests/unit/xpcshell.ini
@@ -18,24 +18,18 @@ generated-files =
 [test_bug364285-1.js]
 # Bug 902073: test fails consistently on Android x86
 skip-if = os == "android"
 [test_bug374754.js]
 [test_bug476919.js]
 # Bug 676998: test fails consistently on Android
 fail-if = os == "android"
 [test_bug478086.js]
-[test_bug656331.js]
-# Bug 676998: test fails consistently on Android
-fail-if = os == "android"
 [test_bug725015.js]
 [test_debugger_malloc_size_of.js]
-[test_compmgr_warnings.js]
-# Bug 676998: test fails consistently on Android
-fail-if = os == "android"
 [test_file_createUnique.js]
 [test_file_equality.js]
 [test_hidden_files.js]
 [test_home.js]
 # Bug 676998: test fails consistently on Android
 fail-if = os == "android"
 [test_iniProcessor.js]
 [test_ioutil.js]
@@ -59,18 +53,16 @@ skip-if = os == "android"
 [test_stringstream.js]
 [test_symlinks.js]
 # Bug 676998: test fails consistently on Android
 fail-if = os == "android"
 [test_systemInfo.js]
 # Bug 902081: test fails consistently on Android 2.2, passes on 4.0
 skip-if = os == "android"
 [test_versioncomparator.js]
-[test_comp_no_aslr.js]
-skip-if = os != "win"
 [test_windows_shortcut.js]
 skip-if = os != "win"
 [test_windows_cmdline_file.js]
 skip-if = os != "win"
 [test_bug745466.js]
 skip-if = os == "win"
 # Bug 676998: test fails consistently on Android
 fail-if = os == "android"