diff options
Diffstat (limited to 'toolkit/components/webextensions/test/mochitest/test_ext_schema.html')
-rw-r--r-- | toolkit/components/webextensions/test/mochitest/test_ext_schema.html | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/toolkit/components/webextensions/test/mochitest/test_ext_schema.html b/toolkit/components/webextensions/test/mochitest/test_ext_schema.html deleted file mode 100644 index 8a0e11c56..000000000 --- a/toolkit/components/webextensions/test/mochitest/test_ext_schema.html +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Test for schema API creation</title> - <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> - <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"></script> - <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js"></script> - <script type="text/javascript" src="chrome_head.js"></script> - <script type="text/javascript" src="head.js"></script> - <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> -</head> -<body> - -<script type="text/javascript"> -"use strict"; - -add_task(function* testEmptySchema() { - function background() { - browser.test.assertEq(undefined, browser.manifest, "browser.manifest is not defined"); - browser.test.assertTrue("storage" in browser, "browser.storage should be defined"); - browser.test.assertEq(undefined, browser.contextMenus, "browser.contextMenus should not be defined"); - browser.test.notifyPass("schema"); - } - - let extension = ExtensionTestUtils.loadExtension({ - background, - manifest: { - permissions: ["storage"], - }, - }); - - yield extension.startup(); - yield extension.awaitFinish("schema"); - yield extension.unload(); -}); - -add_task(function* testUnknownProperties() { - function background() { - browser.test.notifyPass("loaded"); - } - - let extension = ExtensionTestUtils.loadExtension({ - manifest: { - permissions: ["unknownPermission"], - - unknown_property: {}, - }, - - background, - }); - - let messages = [ - {message: /processing permissions\.0: Unknown permission "unknownPermission"/}, - {message: /processing unknown_property: An unexpected property was found in the WebExtension manifest/}, - ]; - - let waitForConsole = new Promise(resolve => { - SimpleTest.monitorConsole(resolve, messages); - }); - - yield extension.startup(); - - yield extension.awaitFinish("loaded"); - - yield extension.unload(); - - SimpleTest.endMonitorConsole(); - yield waitForConsole; -}); -</script> - -</body> -</html> |