Bug 1253565 - [webext] Test "UnrecognizedProperty" on content_scripts manifest properties. r=kmag

MozReview-Commit-ID: CpNmXmHHOzO

--HG--
extra : rebase_source : 36325e52efdb4edaf32079ae9637b7f43076ebef
This commit is contained in:
Luca Greco 2016-03-14 12:12:18 +01:00
parent d6bd2ce740
commit 896cbecf01

View File

@ -50,6 +50,7 @@ add_task(function* test_contentscript() {
"matches": ["http://mochi.test/*/file_sample.html"],
"js": ["content_script_start.js"],
"run_at": "document_start",
"unrecognized_property": "with-a-random-value",
},
{
"matches": ["http://mochi.test/*/file_sample.html"],
@ -92,6 +93,14 @@ add_task(function* test_contentscript() {
let chromeNamespacePromise = extension.awaitMessage("chrome-namespace-ok");
SimpleTest.waitForExplicitFinish();
let waitForConsole = new Promise(resolve => {
SimpleTest.monitorConsole(resolve, [{
message: /Reading manifest: Error processing content_scripts.*.unrecognized_property: An unexpected property was found/,
}]);
});
yield extension.startup();
info("extension loaded");
@ -108,6 +117,9 @@ add_task(function* test_contentscript() {
yield extension.unload();
info("extension unloaded");
SimpleTest.endMonitorConsole();
yield waitForConsole;
});
</script>