Bug 1224338 - Run ContactsService.jsm in the parent process in e10s builds. r=gwagner
authorAndrew McCreight <continuation@gmail.com>
Mon, 16 Nov 2015 09:52:17 -0800
changeset 272805 37ada9330ed67f40c74ef6bdb81c230ca26a2794
parent 272804 b22d1abe0289b6bf6ab30c03015a6553e7aefd1d
child 272806 db37afd94942bc2b3298c66ff4a516ca938825ec
push id29682
push userkwierso@gmail.com
push dateTue, 17 Nov 2015 01:21:10 +0000
treeherdermozilla-central@a2f83cbe53ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgwagner
bugs1224338
milestone45.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 1224338 - Run ContactsService.jsm in the parent process in e10s builds. r=gwagner
dom/contacts/tests/contacts_chromescript.js
dom/contacts/tests/mochitest.ini
dom/contacts/tests/shared.js
new file mode 100644
--- /dev/null
+++ b/dom/contacts/tests/contacts_chromescript.js
@@ -0,0 +1,2 @@
+// Ensure the contacts service is running in the parent.
+Components.utils.import("resource://gre/modules/ContactService.jsm");
--- a/dom/contacts/tests/mochitest.ini
+++ b/dom/contacts/tests/mochitest.ini
@@ -1,11 +1,10 @@
 [DEFAULT]
-skip-if = e10s
-support-files = shared.js
+support-files = shared.js contacts_chromescript.js
 
 [test_contacts_basics.html]
 skip-if = (toolkit == 'gonk' && debug) #debug-only failure
 [test_contacts_basics2.html]
 skip-if = (toolkit == 'gonk' && debug) || (os == 'win' && os_version == '5.1') #debug-only failure, bug 967258 on XP
 [test_contacts_blobs.html]
 skip-if = (toolkit == 'gonk' && debug) #debug-only failure
 [test_contacts_events.html]
--- a/dom/contacts/tests/shared.js
+++ b/dom/contacts/tests/shared.js
@@ -1,13 +1,15 @@
 "use strict";
 
 // Fix the environment to run Contacts tests
 if (SpecialPowers.isMainProcess()) {
   SpecialPowers.Cu.import("resource://gre/modules/ContactService.jsm");
+} else {
+  SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL('contacts_chromescript.js'));
 }
 
 // Some helpful global vars
 var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
 
 var defaultOptions = {
   sortBy: "givenName",
 };