Bug 1362047 - Add comment explaining unobvous uses of mockAppInfo() r=kmag
authorTomislav Jovanovic <tomica@gmail.com>
Sun, 21 May 2017 17:30:28 +0200
changeset 359829 1ec7b0cb2bfdd8c270c4d51060c98004ebd6e3cf
parent 359828 3342de3cb3762de6e1a3a70b963aae24af650c8f
child 359830 33be00ba2f75d251c4628781afb4ad8ec49adea4
push id31859
push userihsiao@mozilla.com
push dateMon, 22 May 2017 03:28:26 +0000
treeherdermozilla-central@367944041b55 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1362047
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1362047 - Add comment explaining unobvous uses of mockAppInfo() r=kmag MozReview-Commit-ID: 1ZSFXrmGS00
toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
toolkit/components/extensions/test/xpcshell/test_ext_i18n.js
--- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js
@@ -1,15 +1,17 @@
 "use strict";
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
 
+// ExtensionContent.jsm needs to know when it's running from xpcshell,
+// to use the right timeout for content scripts executed at document_idle.
 ExtensionTestUtils.mockAppInfo();
 
 add_task(async function test_contentscript_runAt() {
   function background() {
     browser.runtime.onMessage.addListener(([msg, expectedStates, readyState], sender) => {
       if (msg == "chrome-namespace-ok") {
         browser.test.sendMessage(msg);
         return;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js
@@ -1,12 +1,14 @@
 "use strict";
 
 Cu.import("resource://gre/modules/Preferences.jsm");
 
+// ExtensionContent.jsm needs to know when it's running from xpcshell,
+// to use the right timeout for content scripts executed at document_idle.
 ExtensionTestUtils.mockAppInfo();
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
 const XRAY_PREF = "dom.allow_named_properties_object_for_xrays";
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js
@@ -1,12 +1,14 @@
 "use strict";
 
 Cu.import("resource://gre/modules/Preferences.jsm");
 
+// ExtensionContent.jsm needs to know when it's running from xpcshell,
+// to use the right timeout for content scripts executed at document_idle.
 ExtensionTestUtils.mockAppInfo();
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
 
 do_register_cleanup(() => {