Backout bug 754062 (c53f474c502b) for xpcshell breakage

This commit is contained in:
Gregory Szorc 2012-06-20 11:51:49 -07:00
parent ac65829f1c
commit 42f9aa1b99
13 changed files with 1 additions and 113 deletions

View File

@ -453,9 +453,6 @@
@BINPATH@/components/Weave.js
@BINPATH@/components/Aitc.js
#endif
#ifdef MOZ_SERVICES_NOTIFICATIONS
@BINPATH@/components/NotificationsComponents.manifest
#endif
@BINPATH@/components/TelemetryPing.js
@BINPATH@/components/TelemetryPing.manifest
@BINPATH@/components/messageWakeupService.js

View File

@ -11,7 +11,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_SERVICES_SYNC
PARALLEL_DIRS += aitc common crypto notifications sync
PARALLEL_DIRS += aitc common crypto sync
endif
include $(topsrcdir)/config/rules.mk

View File

@ -8,7 +8,6 @@ add_makefiles "
services/common/Makefile
services/crypto/Makefile
services/crypto/component/Makefile
services/notifications/Makefile
services/sync/Makefile
services/sync/locales/Makefile
"
@ -17,7 +16,6 @@ if [ "$ENABLE_TESTS" ]; then
add_makefiles "
services/common/tests/Makefile
services/crypto/tests/Makefile
services/notifications/tests/Makefile
services/sync/tests/Makefile
"
fi

View File

@ -1,32 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_COMPONENTS = \
NotificationsComponents.manifest \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/services-notifications.js
modules := \
service.js \
$(NULL)
source_modules = $(foreach module,$(modules),$(srcdir)/$(module))
module_dir = $(FINAL_TARGET)/modules/services-notifications
GENERATED_DIRS += $(module_dir)
libs::
$(NSINSTALL) $(source_modules) $(module_dir)
TEST_DIRS += tests
include $(topsrcdir)/config/rules.mk

View File

@ -1,2 +0,0 @@
# Register resource aliases
resource services-notifications resource:///modules/services-notifications/

View File

@ -1,11 +0,0 @@
Here lies most of the moving parts for push notifcations in the browser. DOM
and UI bindings will live elsewhere; these files deal with talking to the API,
storing messages, and creating persistent connections to the notification
server.
Structure:
services.js::Service
This is a singleton that manages API calls and message storage. It's an
instance of the NotificationSvc class. Messages and state are persisted to a
JSON file on disk.

View File

@ -1,28 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 EXPORTED_SYMBOLS = ["Service"];
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import("resource://services-common/preferences.js");
const PREFS_BRANCH = "services.notifications.";
function NotificationSvc() {
this.ready = false;
this.prefs = new Preferences(PREFS_BRANCH);
}
NotificationSvc.prototype = {
get serverURL() this.prefs.get("serverURL"),
onStartup: function onStartup() {
this.ready = true;
}
};
let Service = new NotificationSvc();
Service.onStartup();

View File

@ -1 +0,0 @@
pref("services.notifications.serverURL", "https://notifications.mozilla.org/");

View File

@ -1,16 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = services/notifications/tests
include $(DEPTH)/config/autoconf.mk
MODULE = test_services_notifications
XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

View File

@ -1,3 +0,0 @@
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
let _ = function() print(Array.slice(arguments).join(" "));

View File

@ -1,8 +0,0 @@
// Check that everything is getting hooked together properly.
function run_test() {
_("When imported, Service.onStartup is called.");
Cu.import("resource://services-notifications/service.js");
do_check_eq(Service.serverURL, "https://notifications.mozilla.org/");
do_check_eq(Service.ready, true);
}

View File

@ -1,5 +0,0 @@
[DEFAULT]
head = head_helpers.js
tail =
[test_service_start.js]

View File

@ -76,7 +76,6 @@ skip-if = os == "android"
[include:services/common/tests/unit/xpcshell.ini]
[include:services/crypto/tests/unit/xpcshell.ini]
[include:services/crypto/components/tests/unit/xpcshell.ini]
[include:services/notifications/tests/unit/xpcshell.ini]
[include:services/sync/tests/unit/xpcshell.ini]
# Bug 676978: tests hang on Android
skip-if = os == "android"