Bug 699575: move browser modules to browser/modules, r=dao
--- a/browser/Makefile.in
+++ b/browser/Makefile.in
@@ -42,16 +42,17 @@ VPATH = @srcdir@
include $(topsrcdir)/config/config.mk
PARALLEL_DIRS = \
base \
components \
fuel \
locales \
+ modules \
themes \
$(NULL)
DIRS = \
devtools \
app \
$(NULL)
--- a/browser/base/Makefile.in
+++ b/browser/base/Makefile.in
@@ -48,21 +48,16 @@ include $(topsrcdir)/config/config.mk
abs_srcdir = $(call core_abspath,$(srcdir))
CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html
ifdef ENABLE_TESTS
DIRS += content/test
endif
-EXTRA_JS_MODULES = \
- content/openLocationLastURL.jsm \
- content/NetworkPrioritizer.jsm \
- $(NULL)
-
include $(topsrcdir)/config/rules.mk
PRE_RELEASE_SUFFIX := ""
DEFINES += \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -195,17 +195,17 @@ let gInitialPages = [
#endif
XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
#ifdef XP_WIN
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
if (WINTASKBAR_CONTRACTID in Cc &&
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
let temp = {};
- Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp);
+ Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", temp);
let AeroPeek = temp.AeroPeek;
return {
onOpenWindow: function () {
AeroPeek.onOpenWindow(window);
},
onCloseWindow: function () {
AeroPeek.onCloseWindow(window);
}
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -86,17 +86,16 @@ endif
# back to the clear recent history dialog (santize.xul), if it ever is (bug
# 480169)
# browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638.
_BROWSER_FILES = \
browser_typeAheadFind.js \
browser_keywordSearch.js \
- browser_NetworkPrioritizer.js \
browser_allTabsPanel.js \
browser_alltabslistener.js \
browser_bug304198.js \
browser_bug321000.js \
title_test.svg \
browser_bug329212.js \
browser_bug356571.js \
browser_bug380960.js \
--- a/browser/components/Makefile.in
+++ b/browser/components/Makefile.in
@@ -69,20 +69,16 @@ PARALLEL_DIRS = \
search \
sessionstore \
shell \
sidebar/src \
tabview \
migration \
$(NULL)
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-PARALLEL_DIRS += wintaskbar
-endif
-
ifdef MOZ_SAFE_BROWSING
PARALLEL_DIRS += safebrowsing
endif
ifdef ENABLE_TESTS
DIRS += test/browser
endif
--- a/browser/makefiles.sh
+++ b/browser/makefiles.sh
@@ -75,32 +75,30 @@ browser/devtools/sourceeditor/Makefile
browser/devtools/styleeditor/Makefile
browser/devtools/styleinspector/Makefile
browser/devtools/webconsole/Makefile
browser/fuel/Makefile
browser/fuel/public/Makefile
browser/fuel/src/Makefile
browser/installer/Makefile
browser/locales/Makefile
+browser/modules/Makefile
browser/themes/Makefile
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/content/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
if [ "$MOZ_SAFE_BROWSING" ]; then
add_makefiles "
browser/components/safebrowsing/Makefile
"
fi
if [ "$MOZ_WIDGET_TOOLKIT" = "windows" ]; then
- add_makefiles "
- browser/components/wintaskbar/Makefile
- "
if [ "$MOZ_INSTALLER" ]; then
add_makefiles "
browser/installer/windows/Makefile
"
fi
fi
if [ "$MOZ_WIDGET_TOOLKIT" = "gtk2" -o "$MOZ_WIDGET_TOOLKIT" = "qt" ]; then
@@ -141,20 +139,16 @@ if [ "$ENABLE_TESTS" ]; then
browser/devtools/highlighter/test/Makefile
browser/devtools/scratchpad/test/Makefile
browser/devtools/shared/test/Makefile
browser/devtools/sourceeditor/test/Makefile
browser/devtools/styleeditor/test/Makefile
browser/devtools/styleinspector/test/browser/Makefile
browser/devtools/webconsole/test/browser/Makefile
browser/fuel/test/Makefile
+ browser/modules/test/Makefile
"
if [ "$MOZ_SAFE_BROWSING" ]; then
add_makefiles "
browser/components/safebrowsing/content/test/Makefile
"
fi
- if [ "$MOZ_WIDGET_TOOLKIT" = "windows" ]; then
- add_makefiles "
- browser/components/wintaskbar/test/Makefile
- "
- fi
fi
copy from browser/base/Makefile.in
copy to browser/modules/Makefile.in
--- a/browser/base/Makefile.in
+++ b/browser/modules/Makefile.in
@@ -1,9 +1,8 @@
-#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
@@ -40,46 +39,25 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
-abs_srcdir = $(call core_abspath,$(srcdir))
-
-CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html
-
ifdef ENABLE_TESTS
-DIRS += content/test
+DIRS += test
endif
EXTRA_JS_MODULES = \
- content/openLocationLastURL.jsm \
- content/NetworkPrioritizer.jsm \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-PRE_RELEASE_SUFFIX := ""
-
-DEFINES += \
- -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
- -DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \
- -DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
+ openLocationLastURL.jsm \
+ NetworkPrioritizer.jsm \
$(NULL)
-ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DHAVE_SHELL_SERVICE=1
-endif
-
-ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+EXTRA_JS_MODULES += \
+ WindowsPreviewPerTab.jsm \
+ WindowsJumpLists.jsm \
+ $(NULL)
endif
-ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
-endif
-
-ifneq (,$(filter windows gtk2, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DMENUBAR_CAN_AUTOHIDE=1
-endif
+include $(topsrcdir)/config/rules.mk
rename from browser/base/content/NetworkPrioritizer.jsm
rename to browser/modules/NetworkPrioritizer.jsm
rename from browser/components/wintaskbar/WindowsJumpLists.jsm
rename to browser/modules/WindowsJumpLists.jsm
rename from browser/components/wintaskbar/WindowsPreviewPerTab.jsm
rename to browser/modules/WindowsPreviewPerTab.jsm
rename from browser/base/content/openLocationLastURL.jsm
rename to browser/modules/openLocationLastURL.jsm
new file mode 100644
--- /dev/null
+++ b/browser/modules/test/Makefile.in
@@ -0,0 +1,57 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+relativesrcdir = browser/modules/test
+
+include $(DEPTH)/config/autoconf.mk
+include $(topsrcdir)/config/rules.mk
+
+_BROWSER_FILES = \
+ browser_NetworkPrioritizer.js \
+ $(NULL)
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+_BROWSER_FILES += \
+ browser_taskbar_preview.js \
+ $(NULL)
+endif
+
+libs:: $(_BROWSER_FILES)
+ $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
rename from browser/base/content/test/browser_NetworkPrioritizer.js
rename to browser/modules/test/browser_NetworkPrioritizer.js
rename from browser/components/wintaskbar/test/browser_taskbar_preview.js
rename to browser/modules/test/browser_taskbar_preview.js
--- a/browser/components/wintaskbar/test/browser_taskbar_preview.js
+++ b/browser/modules/test/browser_taskbar_preview.js
@@ -9,17 +9,17 @@ function test() {
is(!!Win7Features, isWin7OrHigher, "Win7Features available when it should be");
if (!isWin7OrHigher)
return;
const ENABLE_PREF_NAME = "browser.taskbar.previews.enable";
let temp = {};
- Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp);
+ Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", temp);
let AeroPeek = temp.AeroPeek;
waitForExplicitFinish();
gPrefService.setBoolPref(ENABLE_PREF_NAME, true);
is(1, AeroPeek.windows.length, "Got the expected number of windows");