Bug 840287 - Move NewTabUtils.jsm into toolkit [r=ttaubert]
authorMatt Brubeck <mbrubeck@mozilla.com>
Sat, 16 Feb 2013 20:16:16 -0800
changeset 122161 0e3aca33a0391df2fc6354b6ced74817bb722a74
parent 122160 89c0a82b70e76a91eb369ceccc009372bee15266
child 122162 4a7cf5d271cb0156a153b1c3ec7f8267f02eb433
push id24320
push userryanvm@gmail.com
push dateSun, 17 Feb 2013 12:06:45 +0000
treeherdermozilla-central@5e137a87e84f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs840287
milestone21.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 840287 - Move NewTabUtils.jsm into toolkit [r=ttaubert]
browser/base/content/newtab/newTab.js
browser/base/content/test/newtab/head.js
browser/components/nsBrowserGlue.js
browser/modules/Makefile.in
browser/modules/NewTabUtils.jsm
browser/modules/test/Makefile.in
browser/modules/test/unit/chromeappsstore.sqlite
browser/modules/test/unit/test_newtab-migrate-v1.js
browser/modules/test/unit/xpcshell.ini
toolkit/modules/Makefile.in
toolkit/modules/NewTabUtils.jsm
toolkit/modules/tests/xpcshell/chromeappsstore.sqlite
toolkit/modules/tests/xpcshell/test_newtab-migrate-v1.js
toolkit/modules/tests/xpcshell/xpcshell.ini
--- a/browser/base/content/newtab/newTab.js
+++ b/browser/base/content/newtab/newTab.js
@@ -5,17 +5,17 @@
 "use strict";
 
 let Cu = Components.utils;
 let Ci = Components.interfaces;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/PageThumbs.jsm");
-Cu.import("resource:///modules/NewTabUtils.jsm");
+Cu.import("resource://gre/modules/NewTabUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Rect",
   "resource://gre/modules/Geometry.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 let {
   links: gLinks,
--- a/browser/base/content/test/newtab/head.js
+++ b/browser/base/content/test/newtab/head.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
 
 Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, true);
 
 let tmp = {};
-Cu.import("resource:///modules/NewTabUtils.jsm", tmp);
+Cu.import("resource://gre/modules/NewTabUtils.jsm", tmp);
 Cc["@mozilla.org/moz/jssubscript-loader;1"]
   .getService(Ci.mozIJSSubScriptLoader)
   .loadSubScript("chrome://browser/content/sanitize.js", tmp);
 
 let {NewTabUtils, Sanitizer} = tmp;
 
 let uri = Services.io.newURI("about:newtab", null, null);
 let principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri);
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -34,17 +34,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 XPCOMUtils.defineLazyModuleGetter(this, "webappsUI",
                                   "resource:///modules/webappsUI.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
                                   "resource://gre/modules/PageThumbs.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
-                                  "resource:///modules/NewTabUtils.jsm");
+                                  "resource://gre/modules/NewTabUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "BrowserNewTabPreloader",
                                   "resource:///modules/BrowserNewTabPreloader.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PdfJs",
                                   "resource://pdf.js/PdfJs.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "webrtcUI",
--- a/browser/modules/Makefile.in
+++ b/browser/modules/Makefile.in
@@ -13,17 +13,16 @@ include $(topsrcdir)/config/config.mk
 
 TEST_DIRS += test
 
 EXTRA_JS_MODULES = \
 	AboutHomeUtils.jsm \
 	BrowserNewTabPreloader.jsm \
 	openLocationLastURL.jsm \
 	NetworkPrioritizer.jsm \
-	NewTabUtils.jsm \
 	offlineAppCache.jsm \
 	SignInToWebsite.jsm \
 	webappsUI.jsm \
 	webrtcUI.jsm \
 	KeywordURLResetPrompter.jsm \
 	Social.jsm \
 	SharedFrame.jsm \
 	$(NULL)
--- a/browser/modules/test/Makefile.in
+++ b/browser/modules/test/Makefile.in
@@ -9,18 +9,16 @@ VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 DIRS = \
 	chrome \
 	$(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
-
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
                  browser_NetworkPrioritizer.js \
                  # bug 793906 - temporarily disabling desktop UI while working on b2g
                  # browser_SignInToWebsite.js \
                  $(NULL)
 
deleted file mode 100644
--- a/browser/modules/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-head =
-tail =
-firefox-appdir = browser
-
-[test_newtab-migrate-v1.js]
--- a/toolkit/modules/Makefile.in
+++ b/toolkit/modules/Makefile.in
@@ -7,13 +7,14 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 TEST_DIRS += tests
 
 EXTRA_JS_MODULES := \
+  NewTabUtils.jsm \
   Sqlite.jsm \
   TelemetryTimestamps.jsm \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
rename from browser/modules/NewTabUtils.jsm
rename to toolkit/modules/NewTabUtils.jsm
rename from browser/modules/test/unit/chromeappsstore.sqlite
rename to toolkit/modules/tests/xpcshell/chromeappsstore.sqlite
rename from browser/modules/test/unit/test_newtab-migrate-v1.js
rename to toolkit/modules/tests/xpcshell/test_newtab-migrate-v1.js
--- a/browser/modules/test/unit/test_newtab-migrate-v1.js
+++ b/toolkit/modules/tests/xpcshell/test_newtab-migrate-v1.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 const Cr = Components.results;
 
-Cu.import("resource:///modules/NewTabUtils.jsm");
+Cu.import("resource://gre/modules/NewTabUtils.jsm");
 Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
 Cu.import("resource://gre/modules/Services.jsm");
 
 /**
  * Asynchronously load test data from chromeappstore.sqlite.
  *
  * @param aDBFile
  *        the database file to load
--- a/toolkit/modules/tests/xpcshell/xpcshell.ini
+++ b/toolkit/modules/tests/xpcshell/xpcshell.ini
@@ -1,6 +1,7 @@
 [DEFAULT]
 head =
 tail =
 
+[test_newtab-migrate-v1.js]
 [test_sqlite.js]
 [test_TelemetryTimestamps.js]