Backed out 5 changesets (bug 1253565) for test_ext_contentscript.html failures
authorWes Kocher <wkocher@mozilla.com>
Mon, 14 Mar 2016 11:16:28 -0700
changeset 288537 21077a8abccf547e9ff9d40629902a676626544e
parent 288536 2602e9da8592ce52e68a22203881ab238506cc94
child 288538 49091802cb61e99f00481a030b1ee4bb7acad87c
child 288565 422077f61bcb9ae19215de09e635c1082357233e
push id18164
push userkwierso@gmail.com
push dateMon, 14 Mar 2016 18:16:34 +0000
treeherderfx-team@21077a8abccf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1253565
milestone48.0a1
backs outd50f024f55d81364ead7bdb729b01746399325c5
8a78c738b882f9d8a4171a038fa1b4d71c958394
1e47cefe3b9b90f6731006768dd7c9bcf1ff8286
c02c1dc34180806bc48e56cc46ddf58b1d929b63
398160abc223561f29deb190949910154c4f5b03
Backed out 5 changesets (bug 1253565) for test_ext_contentscript.html failures Backed out changeset d50f024f55d8 (bug 1253565) Backed out changeset 8a78c738b882 (bug 1253565) Backed out changeset 1e47cefe3b9b (bug 1253565) Backed out changeset c02c1dc34180 (bug 1253565) Backed out changeset 398160abc223 (bug 1253565) MozReview-Commit-ID: 4RN69nKhyYr
browser/components/extensions/schemas/browser_action.json
browser/components/extensions/schemas/commands.json
browser/components/extensions/schemas/page_action.json
browser/components/extensions/test/browser/browser.ini
browser/components/extensions/test/browser/browser_ext_browserAction_simple.js
browser/components/extensions/test/browser/browser_ext_commands_onCommand.js
browser/components/extensions/test/browser/browser_ext_pageAction_simple.js
toolkit/components/extensions/schemas/manifest.json
toolkit/components/extensions/test/mochitest/chrome.ini
toolkit/components/extensions/test/mochitest/test_chrome_ext_eventpage_warning.html
toolkit/components/extensions/test/mochitest/test_ext_contentscript.html
--- a/browser/components/extensions/schemas/browser_action.json
+++ b/browser/components/extensions/schemas/browser_action.json
@@ -6,17 +6,16 @@
   {
     "namespace": "manifest",
     "types": [
       {
         "$extend": "WebExtensionManifest",
         "properties": {
           "browser_action": {
             "type": "object",
-            "additionalProperties": { "$ref": "UnrecognizedProperty" },
             "properties": {
               "default_title": {
                 "type": "string",
                 "optional": true,
                 "preprocess": "localize"
               },
               "default_icon": {
                 "$ref": "IconPath",
--- a/browser/components/extensions/schemas/commands.json
+++ b/browser/components/extensions/schemas/commands.json
@@ -22,17 +22,16 @@
       {
         "$extend": "WebExtensionManifest",
         "properties": {
           "commands": {
             "type": "object",
             "optional": true,
             "additionalProperties": {
               "type": "object",
-              "additionalProperties": { "$ref": "UnrecognizedProperty" },
               "properties": {
                 "suggested_key": {
                   "type": "object",
                   "optional": true,
                   "properties": {
                     "default": {
                       "$ref": "KeyName",
                       "optional": true
@@ -139,9 +138,9 @@
               }
             ],
             "description": "Called to return the registered commands."
           }
         ]
       }
     ]
   }
-]
+]
\ No newline at end of file
--- a/browser/components/extensions/schemas/page_action.json
+++ b/browser/components/extensions/schemas/page_action.json
@@ -6,17 +6,16 @@
   {
     "namespace": "manifest",
     "types": [
       {
         "$extend": "WebExtensionManifest",
         "properties": {
           "page_action": {
             "type": "object",
-            "additionalProperties": { "$ref": "UnrecognizedProperty" },
             "properties": {
               "default_title": {
                 "type": "string",
                 "optional": true,
                 "preprocess": "localize"
               },
               "default_icon": {
                 "$ref": "IconPath",
--- a/browser/components/extensions/test/browser/browser.ini
+++ b/browser/components/extensions/test/browser/browser.ini
@@ -13,17 +13,16 @@ support-files =
   file_language_ja.html
 
 [browser_ext_simple.js]
 [browser_ext_currentWindow.js]
 [browser_ext_browserAction_simple.js]
 [browser_ext_browserAction_pageAction_icon.js]
 [browser_ext_browserAction_context.js]
 [browser_ext_browserAction_disabled.js]
-[browser_ext_pageAction_simple.js]
 [browser_ext_pageAction_context.js]
 [browser_ext_pageAction_popup.js]
 [browser_ext_browserAction_popup.js]
 [browser_ext_popup_api_injection.js]
 [browser_ext_contextMenus.js]
 [browser_ext_commands_getAll.js]
 [browser_ext_commands_onCommand.js]
 [browser_ext_getViews.js]
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_simple.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_simple.js
@@ -2,17 +2,16 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 add_task(function* () {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "browser_action": {
         "default_popup": "popup.html",
-        "unrecognized_property": "with-a-random-value",
       },
     },
 
     files: {
       "popup.html": `
       <!DOCTYPE html>
       <html><body>
       <script src="popup.js"></script>
@@ -27,31 +26,21 @@ add_task(function* () {
     background: function() {
       browser.runtime.onMessage.addListener(msg => {
         browser.test.assertEq(msg, "from-popup", "correct message received");
         browser.test.sendMessage("popup");
       });
     },
   });
 
-  SimpleTest.waitForExplicitFinish();
-  let waitForConsole = new Promise(resolve => {
-    SimpleTest.monitorConsole(resolve, [{
-      message: /Reading manifest: Error processing browser_action.unrecognized_property: An unexpected property was found/,
-    }]);
-  });
-
   yield extension.startup();
 
   // Do this a few times to make sure the pop-up is reloaded each time.
   for (let i = 0; i < 3; i++) {
     clickBrowserAction(extension);
 
     yield extension.awaitMessage("popup");
 
     closeBrowserAction(extension);
   }
 
   yield extension.unload();
-
-  SimpleTest.endMonitorConsole();
-  yield waitForConsole;
 });
--- a/browser/components/extensions/test/browser/browser_ext_commands_onCommand.js
+++ b/browser/components/extensions/test/browser/browser_ext_commands_onCommand.js
@@ -16,37 +16,28 @@ add_task(function* () {
           "suggested_key": {
             "default": "Alt+Shift+3",
           },
         },
         "toggle-feature-using-alt-shift-comma": {
           "suggested_key": {
             "default": "Alt+Shift+Comma",
           },
-          "unrecognized_property": "with-a-random-value",
         },
       },
     },
 
     background: function() {
       browser.commands.onCommand.addListener((message) => {
         browser.test.sendMessage("oncommand", message);
       });
       browser.test.sendMessage("ready");
     },
   });
 
-
-  SimpleTest.waitForExplicitFinish();
-  let waitForConsole = new Promise(resolve => {
-    SimpleTest.monitorConsole(resolve, [{
-      message: /Reading manifest: Error processing commands.*.unrecognized_property: An unexpected property was found/,
-    }]);
-  });
-
   yield extension.startup();
   yield extension.awaitMessage("ready");
 
   // Create another window after the extension is loaded.
   let win2 = yield BrowserTestUtils.openNewBrowserWindow();
   yield BrowserTestUtils.loadURI(win2.gBrowser.selectedBrowser, "about:config");
   yield BrowserTestUtils.browserLoaded(win2.gBrowser.selectedBrowser);
 
@@ -75,12 +66,9 @@ add_task(function* () {
   keyset = win1.document.getElementById(keysetID);
   is(keyset, null, "Expected keyset to be removed from the window");
 
   keyset = win2.document.getElementById(keysetID);
   is(keyset, null, "Expected keyset to be removed from the window");
 
   yield BrowserTestUtils.closeWindow(win1);
   yield BrowserTestUtils.closeWindow(win2);
-
-  SimpleTest.endMonitorConsole();
-  yield waitForConsole;
 });
deleted file mode 100644
--- a/browser/components/extensions/test/browser/browser_ext_pageAction_simple.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-add_task(function* () {
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      "page_action": {
-        "default_popup": "popup.html",
-        "unrecognized_property": "with-a-random-value",
-      },
-    },
-
-    files: {
-      "popup.html": `
-      <!DOCTYPE html>
-      <html><body>
-      <script src="popup.js"></script>
-      </body></html>
-      `,
-
-      "popup.js": function() {
-        browser.runtime.sendMessage("from-popup");
-      },
-    },
-
-    background: function() {
-      browser.runtime.onMessage.addListener(msg => {
-        browser.test.assertEq(msg, "from-popup", "correct message received");
-        browser.test.sendMessage("popup");
-      });
-      browser.tabs.query({active: true, currentWindow: true}, tabs => {
-        let tabId = tabs[0].id;
-
-        browser.pageAction.show(tabId);
-        browser.test.sendMessage("page-action-shown");
-      });
-    },
-  });
-
-  SimpleTest.waitForExplicitFinish();
-  let waitForConsole = new Promise(resolve => {
-    SimpleTest.monitorConsole(resolve, [{
-      message: /Reading manifest: Error processing page_action.unrecognized_property: An unexpected property was found/,
-    }]);
-  });
-
-  yield extension.startup();
-  yield extension.awaitMessage("page-action-shown");
-
-  clickPageAction(extension);
-
-  yield extension.awaitMessage("popup");
-
-  yield extension.unload();
-
-  SimpleTest.endMonitorConsole();
-  yield waitForConsole;
-});
--- a/toolkit/components/extensions/schemas/manifest.json
+++ b/toolkit/components/extensions/schemas/manifest.json
@@ -85,37 +85,27 @@
             }
           },
 
           "background": {
             "choices": [
               {
                 "type": "object",
                 "properties": {
-                  "page": { "$ref": "ExtensionURL" },
-                  "persistent": {
-                    "optional": true,
-                    "$ref": "PersistentBackgroundProperty"
-                  }
-                },
-                "additionalProperties": { "$ref": "UnrecognizedProperty" }
+                  "page": { "$ref": "ExtensionURL" }
+                }
               },
               {
                 "type": "object",
                 "properties": {
                   "scripts": {
                     "type": "array",
                     "items": { "$ref": "ExtensionURL" }
-                  },
-                  "persistent": {
-                    "optional": true,
-                    "$ref": "PersistentBackgroundProperty"
                   }
-                },
-                "additionalProperties": { "$ref": "UnrecognizedProperty" }
+                }
               }
             ],
             "optional": true
           },
 
           "options_ui": {
             "type": "object",
 
@@ -165,17 +155,20 @@
 
           "web_accessible_resources": {
             "type": "array",
             "items": { "type": "string" },
             "optional": true
           }
         },
 
-        "additionalProperties": { "$ref": "UnrecognizedProperty" }
+        "additionalProperties": {
+          "type": "any",
+          "deprecated": "An unexpected property was found in the WebExtension manifest"
+        }
       },
       {
         "id": "Permission",
         "choices": [
           {
             "type": "string",
             "enum": [
               "alarms",
@@ -221,17 +214,16 @@
             "pattern": "^file:///.*$"
           }
         ]
       },
       {
         "id": "ContentScript",
         "type": "object",
         "description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. Based on InjectDetails, but using underscore rather than camel case naming conventions.",
-        "additionalProperties": { "$ref": "UnrecognizedProperty" },
         "properties": {
           "matches": {
             "type": "array",
             "optional": false,
             "minItems": 1,
             "items": { "$ref": "MatchPattern" }
           },
           "exclude_matches": {
@@ -287,22 +279,12 @@
             },
             "additionalProperties": false
           },
           {
             "type": "object",
             "isInstanceOf": "ImageData"
           }
         ]
-      },
-      {
-        "id": "UnrecognizedProperty",
-        "type": "any",
-        "deprecated": "An unexpected property was found in the WebExtension manifest."
-      },
-      {
-        "id": "PersistentBackgroundProperty",
-        "type": "boolean",
-        "deprecated": "Event pages are not currently supported. This will run as a persistent background page."
       }
     ]
   }
 ]
--- a/toolkit/components/extensions/test/mochitest/chrome.ini
+++ b/toolkit/components/extensions/test/mochitest/chrome.ini
@@ -2,9 +2,8 @@
 skip-if = os == 'android'
 support-files =
   file_download.html
   file_download.txt
 
 [test_chrome_ext_downloads_download.html]
 [test_chrome_ext_downloads_misc.html]
 [test_chrome_ext_downloads_search.html]
-[test_chrome_ext_eventpage_warning.html]
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_eventpage_warning.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for WebExtension EventPage Warning</title>
-  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"></script>
-  <script src="chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js"></script>
-  <script type="text/javascript" src="head.js"></script>
-  <link rel="stylesheet" href="chrome://mochikit/contents/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<script type="text/javascript">
-"use strict";
-
-function createEventPageExtension(eventPage) {
-  function eventPageScript() {
-    browser.test.log("running event page as background script");
-    browser.test.sendMessage("running", 1);
-  }
-
-  return ExtensionTestUtils.loadExtension({
-    manifest: {
-      "background": eventPage,
-    },
-    files: {
-      "event-page-script.js": `(${eventPageScript})()`,
-      "event-page.html": `<html><head>
-        <meta charset="utf-8">
-        <script src="event-page-script.js"></${"script"}>
-      </head></html>`,
-    },
-  });
-}
-
-add_task(function* test_eventpages() {
-  // Used in other tests to prevent the monitorConsole to grip.
-  SimpleTest.waitForExplicitFinish();
-
-  let testCases = [
-    {
-      message: "testing event page running as a background page",
-      eventPage: {
-        "page": "event-page.html",
-        "persistent": false,
-      },
-    },
-    {
-      message: "testing event page scripts running as a background page",
-      eventPage: {
-        "scripts": ["event-page-script.js"],
-        "persistent": false,
-      },
-    },
-  ];
-
-  for (let {message, eventPage} of testCases) {
-    info(message);
-
-    // Wait for the expected logged warnings from the manifest validation.
-    let waitForConsole = new Promise(resolve => {
-      SimpleTest.monitorConsole(resolve, [{message: /Event pages are not currently supported./}]);
-    });
-
-    let extension = createEventPageExtension(eventPage);
-
-    info("load complete");
-    let [, x] = yield Promise.all([extension.startup(), extension.awaitMessage("running")]);
-    is(x, 1, "got correct value from extension");
-    info("test complete");
-    yield extension.unload();
-    info("extension unloaded successfully");
-
-    SimpleTest.endMonitorConsole();
-    yield waitForConsole;
-
-    waitForConsole = new Promise(resolve => {
-      SimpleTest.monitorConsole(resolve, [{
-        message: /Reading manifest: Error processing background.nonExistentProp: An unexpected property was found/,
-      }]);
-    });
-
-    info("testing additional unrecognized properties on background page");
-
-    extension = createEventPageExtension({
-      "scripts": ["event-page-script.js"],
-      "nonExistentProp": true,
-    });
-
-    info("load complete");
-    [, x] = yield Promise.all([extension.startup(), extension.awaitMessage("running")]);
-    is(x, 1, "got correct value from extension");
-    info("test complete");
-    yield extension.unload();
-    info("extension unloaded successfully");
-
-    SimpleTest.endMonitorConsole();
-    yield waitForConsole;
-  }
-});
-
-</script>
-
-</body>
-</html>
--- a/toolkit/components/extensions/test/mochitest/test_ext_contentscript.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_contentscript.html
@@ -45,17 +45,16 @@ add_task(function* test_contentscript() 
 
   let extensionData = {
     manifest: {
       content_scripts: [
         {
           "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"],
           "js": ["content_script_end.js"],
           "run_at": "document_end",
         },
         {
           "matches": ["http://mochi.test/*/file_sample.html"],
@@ -88,40 +87,29 @@ add_task(function* test_contentscript() 
   extension.onMessage("script-run-interactive", () => { interactiveCount++; });
 
   let completePromise = new Promise(resolve => {
     extension.onMessage("script-run-complete", () => { completeCount++; resolve(); });
   });
 
   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");
 
   let win = window.open("file_sample.html");
 
   yield Promise.all([waitForLoad(win), completePromise, chromeNamespacePromise]);
   info("test page loaded");
 
   win.close();
 
   is(loadingCount, 1, "document_start script ran exactly once");
   is(interactiveCount, 1, "document_end script ran exactly once");
   is(completeCount, 1, "document_idle script ran exactly once");
 
   yield extension.unload();
   info("extension unloaded");
-
-  SimpleTest.endMonitorConsole();
-  yield waitForConsole;
 });
 </script>
 
 </body>
 </html>