summaryrefslogtreecommitdiffstats
path: root/docshell/test/unit_ipc/test_pb_notification_ipc.js
diff options
context:
space:
mode:
Diffstat (limited to 'docshell/test/unit_ipc/test_pb_notification_ipc.js')
-rw-r--r--docshell/test/unit_ipc/test_pb_notification_ipc.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/docshell/test/unit_ipc/test_pb_notification_ipc.js b/docshell/test/unit_ipc/test_pb_notification_ipc.js
new file mode 100644
index 0000000000..282fa2b30b
--- /dev/null
+++ b/docshell/test/unit_ipc/test_pb_notification_ipc.js
@@ -0,0 +1,17 @@
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+function run_test() {
+ var notifications = 0;
+ var obs = {
+ observe(aSubject, aTopic, aData) {
+ Assert.equal(aTopic, "last-pb-context-exited");
+ notifications++;
+ },
+ };
+ Services.os.addObserver(obs, "last-pb-context-exited");
+
+ run_test_in_child("../unit/test_pb_notification.js", function() {
+ Assert.equal(notifications, 1);
+ do_test_finished();
+ });
+}