summaryrefslogtreecommitdiffstats
path: root/caps/tests
diff options
context:
space:
mode:
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" }],
];