summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/test/mochitest/test_verify_sw_mode.html
blob: 5aea44b62b842891340e2e7cd277e35f3d18af8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE HTML>
<html>
<head>
  <title>Verify WebExtension background service worker 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";
  // This test ensures we are running with the proper settings.
  const {WebExtensionPolicy} = SpecialPowers.Cu.getGlobalForObject(SpecialPowers.Services);
  SimpleTest.ok(WebExtensionPolicy.useRemoteWebExtensions, "extensions running remote");
  SimpleTest.ok(!WebExtensionPolicy.isExtensionProcess, "testing from remote process");
  SimpleTest.ok(WebExtensionPolicy.backgroundServiceWorkerEnabled, "extensions background service worker enabled");
  SimpleTest.ok(AppConstants.MOZ_WEBEXT_WEBIDL_ENABLED, "extensions API webidl bindings enabled");
</script>

</body>
</html>