mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1502525 - Test to verify that mochitests run with in-process extensions r=mixedpuppy
This is the counterpart to test_verify_remote_mode.html Differential Revision: https://phabricator.services.mozilla.com/D60975 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0b4bc1303a
commit
501b01b392
@ -4,6 +4,7 @@ prefs =
|
||||
extensions.webextensions.remote=false
|
||||
dupe-manifest = true
|
||||
|
||||
[test_verify_non_remote_mode.html]
|
||||
[test_ext_storage_cleanup.html]
|
||||
# Bug 1426514 storage_cleanup: clearing localStorage fails with oop
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Verify non-remote mode</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
|
||||
<script type="text/javascript" src="head.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
add_task(async function verify_extensions_in_parent_process() {
|
||||
// This test ensures we are running with the proper settings.
|
||||
const { WebExtensionPolicy } = SpecialPowers.Cu.getGlobalForObject(SpecialPowers.Services);
|
||||
SimpleTest.ok(!WebExtensionPolicy.useRemoteWebExtensions, "extensions running in-process");
|
||||
|
||||
let chromeScript = SpecialPowers.loadChromeScript(() => {
|
||||
const { WebExtensionPolicy } = Cu.getGlobalForObject(Services);
|
||||
Assert.ok(WebExtensionPolicy.isExtensionProcess, "parent is extension process");
|
||||
this.sendAsyncMessage("checks_done");
|
||||
});
|
||||
await chromeScript.promiseOneMessage("checks_done");
|
||||
chromeScript.destroy();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user