summaryrefslogtreecommitdiffstats
path: root/caps/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /caps/tests
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'caps/tests')
-rw-r--r--caps/tests/gtest/TestOriginAttributes.cpp6
-rw-r--r--caps/tests/mochitest/browser_checkloaduri.js5
-rw-r--r--caps/tests/unit/test_origin.js33
3 files changed, 3 insertions, 41 deletions
diff --git a/caps/tests/gtest/TestOriginAttributes.cpp b/caps/tests/gtest/TestOriginAttributes.cpp
index fa759f80d5..61c66fd36a 100644
--- a/caps/tests/gtest/TestOriginAttributes.cpp
+++ b/caps/tests/gtest/TestOriginAttributes.cpp
@@ -45,12 +45,6 @@ TEST(OriginAttributes, Suffix_default)
TestSuffix(attrs);
}
-TEST(OriginAttributes, Suffix_inIsolatedMozBrowser)
-{
- OriginAttributes attrs(true);
- TestSuffix(attrs);
-}
-
TEST(OriginAttributes, FirstPartyDomain_default)
{
bool oldFpiPref = Preferences::GetBool(FPI_PREF);
diff --git a/caps/tests/mochitest/browser_checkloaduri.js b/caps/tests/mochitest/browser_checkloaduri.js
index 11ff2d1a08..3b31164790 100644
--- a/caps/tests/mochitest/browser_checkloaduri.js
+++ b/caps/tests/mochitest/browser_checkloaduri.js
@@ -279,8 +279,9 @@ function testURL(
}
let inheritDisallowed = flags & ssm.DISALLOW_INHERIT_PRINCIPAL;
let shouldThrow = inheritDisallowed ? !canLoadWithoutInherit : !canLoad;
- ok(
- threw == shouldThrow,
+ Assert.equal(
+ threw,
+ shouldThrow,
"Should " +
(shouldThrow ? "" : "not ") +
"throw an error when loading " +
diff --git a/caps/tests/unit/test_origin.js b/caps/tests/unit/test_origin.js
index c0cbc2996a..a24fbab09a 100644
--- a/caps/tests/unit/test_origin.js
+++ b/caps/tests/unit/test_origin.js
@@ -24,10 +24,6 @@ function checkCrossOrigin(a, b) {
function checkOriginAttributes(prin, attrs, suffix) {
attrs = attrs || {};
- Assert.equal(
- prin.originAttributes.inIsolatedMozBrowser,
- attrs.inIsolatedMozBrowser || false
- );
Assert.equal(prin.originSuffix, suffix || "");
Assert.equal(ChromeUtils.originAttributesToSuffix(attrs), suffix || "");
Assert.ok(
@@ -59,9 +55,6 @@ function printAttrs(name, attrs) {
"\tuserContextId: " +
attrs.userContextId +
",\n" +
- "\tinIsolatedMozBrowser: " +
- attrs.inIsolatedMozBrowser +
- ",\n" +
"\tprivateBrowsingId: '" +
attrs.privateBrowsingId +
"',\n" +
@@ -76,10 +69,6 @@ function checkValues(attrs, values) {
// printAttrs("attrs", attrs);
// printAttrs("values", values);
Assert.equal(attrs.userContextId, values.userContextId || 0);
- Assert.equal(
- attrs.inIsolatedMozBrowser,
- values.inIsolatedMozBrowser || false
- );
Assert.equal(attrs.privateBrowsingId, values.privateBrowsingId || "");
Assert.equal(attrs.firstPartyDomain, values.firstPartyDomain || "");
}
@@ -141,26 +130,6 @@ function run_test() {
// Test origin attributes.
//
- // Just browser.
- var exampleOrg_browser = ssm.createContentPrincipal(
- makeURI("http://example.org"),
- { inIsolatedMozBrowser: true }
- );
- var nullPrin_browser = ssm.createNullPrincipal({
- inIsolatedMozBrowser: true,
- });
- checkOriginAttributes(
- exampleOrg_browser,
- { inIsolatedMozBrowser: true },
- "^inBrowser=1"
- );
- checkOriginAttributes(
- nullPrin_browser,
- { inIsolatedMozBrowser: true },
- "^inBrowser=1"
- );
- Assert.equal(exampleOrg_browser.origin, "http://example.org^inBrowser=1");
-
// First party Uri
var exampleOrg_firstPartyDomain = ssm.createContentPrincipal(
makeURI("http://example.org"),
@@ -206,7 +175,6 @@ function run_test() {
);
// Check that all of the above are cross-origin.
- checkCrossOrigin(exampleOrg_browser, nullPrin_browser);
checkCrossOrigin(exampleOrg_firstPartyDomain, exampleOrg);
checkCrossOrigin(exampleOrg_userContext, exampleOrg);
@@ -245,7 +213,6 @@ function run_test() {
var tests = [
["", {}],
["^userContextId=3", { userContextId: 3 }],
- ["^inBrowser=1", { inIsolatedMozBrowser: true }],
["^firstPartyDomain=example.org", { firstPartyDomain: "example.org" }],
];