зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c78f97c0b771 (bug 1314955)
This commit is contained in:
Родитель
66ac15df36
Коммит
5f1776f800
|
@ -28,7 +28,6 @@
|
|||
#include "nsJSPrincipals.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "xpcprivate.h"
|
||||
#include "xpctest_private.h"
|
||||
#include "BackstagePass.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
@ -644,22 +643,6 @@ RegisterAppManifest(JSContext* cx, unsigned argc, Value* vp)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
RegisterXPCTestComponents(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
if (args.length() != 0) {
|
||||
JS_ReportErrorASCII(cx, "Wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
nsresult rv = XRE_AddStaticComponent(&kXPCTestModule);
|
||||
if (NS_FAILED(rv)) {
|
||||
XPCThrower::Throw(rv, cx);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static const JSFunctionSpec glob_functions[] = {
|
||||
JS_FS("print", Print, 0,0),
|
||||
JS_FS("readline", ReadLine, 1,0),
|
||||
|
@ -679,7 +662,6 @@ static const JSFunctionSpec glob_functions[] = {
|
|||
JS_FS("setInterruptCallback", SetInterruptCallback, 1,0),
|
||||
JS_FS("simulateActivityCallback", SimulateActivityCallback, 1,0),
|
||||
JS_FS("registerAppManifest", RegisterAppManifest, 1, 0),
|
||||
JS_FS("registerXPCTestComponents", RegisterXPCTestComponents, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
EXPORTS += [
|
||||
'xpctest_private.h',
|
||||
]
|
||||
|
||||
FINAL_TARGET = '_tests/xpcshell/js/xpconnect/tests/components/native/'
|
||||
EXTRA_COMPONENTS += [
|
||||
'xpctest.manifest',
|
||||
]
|
||||
|
@ -19,4 +16,4 @@ UNIFIED_SOURCES += [
|
|||
'xpctest_returncode.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
XPCOMBinaryComponent('xpctest')
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
/* module registration and factory code. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "xpctest_private.h"
|
||||
|
||||
#define NS_XPCTESTOBJECTREADONLY_CID \
|
||||
|
@ -49,8 +50,10 @@ static const mozilla::Module::ContractIDEntry kXPCTestContracts[] = {
|
|||
{ nullptr }
|
||||
};
|
||||
|
||||
const mozilla::Module kXPCTestModule = {
|
||||
static const mozilla::Module kXPCTestModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kXPCTestCIDs,
|
||||
kXPCTestContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(xpconnect_test) = &kXPCTestModule;
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#include "xpctest_params.h"
|
||||
#include "xpctest_returncode.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
||||
extern const mozilla::Module kXPCTestModule;
|
||||
|
||||
class xpcTestObjectReadOnly final : public nsIXPCTestObjectReadOnly {
|
||||
public:
|
||||
|
|
|
@ -8,7 +8,7 @@ const Ci = Components.interfaces;
|
|||
function run_test() {
|
||||
|
||||
// Load the component manifests.
|
||||
registerXPCTestComponents();
|
||||
registerAppManifest(do_get_file('../components/native/chrome.manifest'));
|
||||
registerAppManifest(do_get_file('../components/js/xpctest.manifest'));
|
||||
|
||||
// Test for each component.
|
||||
|
|
|
@ -8,7 +8,7 @@ const Ci = Components.interfaces;
|
|||
function run_test() {
|
||||
|
||||
// Load the component manifests.
|
||||
registerXPCTestComponents();
|
||||
registerAppManifest(do_get_file('../components/native/chrome.manifest'));
|
||||
registerAppManifest(do_get_file('../components/js/xpctest.manifest'));
|
||||
|
||||
// Test for each component.
|
||||
|
|
|
@ -16,7 +16,7 @@ function getConsoleMessages() {
|
|||
|
||||
function run_test() {
|
||||
// Load the component manifests.
|
||||
registerXPCTestComponents();
|
||||
registerAppManifest(do_get_file('../components/native/chrome.manifest'));
|
||||
registerAppManifest(do_get_file('../components/js/xpctest.manifest'));
|
||||
|
||||
// and the tests.
|
||||
|
|
Загрузка…
Ссылка в новой задаче