summaryrefslogtreecommitdiffstats
path: root/browser/components/about/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /browser/components/about/test
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/about/test')
-rw-r--r--browser/components/about/test/unit/test_getURIFlags.js14
-rw-r--r--browser/components/about/test/unit/xpcshell.toml7
2 files changed, 21 insertions, 0 deletions
diff --git a/browser/components/about/test/unit/test_getURIFlags.js b/browser/components/about/test/unit/test_getURIFlags.js
new file mode 100644
index 0000000000..09846b8122
--- /dev/null
+++ b/browser/components/about/test/unit/test_getURIFlags.js
@@ -0,0 +1,14 @@
+const contract = "@mozilla.org/network/protocol/about;1?what=newtab";
+const am = Cc[contract].getService(Ci.nsIAboutModule);
+const uri = Services.io.newURI("about:newtab");
+
+function run_test() {
+ test_AS_enabled_flags();
+}
+
+// Activity Stream, however, is e10s-capable, and should advertise it.
+function test_AS_enabled_flags() {
+ let flags = am.getURIFlags(uri);
+
+ ok(flags & Ci.nsIAboutModule.URI_MUST_LOAD_IN_CHILD);
+}
diff --git a/browser/components/about/test/unit/xpcshell.toml b/browser/components/about/test/unit/xpcshell.toml
new file mode 100644
index 0000000000..c71e0f2449
--- /dev/null
+++ b/browser/components/about/test/unit/xpcshell.toml
@@ -0,0 +1,7 @@
+[DEFAULT]
+skip-if = ["os == 'android'"] # bug 1730213
+head = ''
+# make the firefox services (eg newtab-service) available to xpcshell
+firefox-appdir = "browser"
+
+["test_getURIFlags.js"]