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
Родитель d6bd2ce740
Коммит 896cbecf01
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -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>