Bug 1654546 - Test that we show the protection UI for top level sandboxed pages. r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D98055
This commit is contained in:
Paul Zuehlcke 2020-11-30 12:26:03 +00:00
parent 58ef92dc3a
commit 6b9a1c976d
4 changed files with 23 additions and 1 deletions

View File

@ -32,6 +32,9 @@ support-files =
skip-if = debug || asan # Bug 1546797
[browser_protectionsUI_socialtracking.js]
[browser_protectionsUI_shield_visibility.js]
support-files =
sandboxed.html
sandboxed.html^headers^
[browser_protectionsUI_state.js]
[browser_protectionsUI_state_reset.js]
[browser_protectionsUI_telemetry.js]

View File

@ -66,6 +66,12 @@ const TEST_CASES = [
testURL: "view-source:https://example.com/",
hidden: true,
},
{
type: "top level sandbox",
testURL:
"https://example.com/browser/browser/base/content/test/protectionsUI/sandboxed.html",
hidden: false,
},
];
add_task(async function setup() {
@ -97,7 +103,7 @@ add_task(async function setup() {
if (testData.type === "certificateError") {
pageLoaded = BrowserTestUtils.waitForErrorPage(browser);
} else {
pageLoaded = BrowserTestUtils.browserLoaded(browser);
pageLoaded = BrowserTestUtils.browserLoaded(browser, true);
}
},
false

View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<!-- 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/. -->
<html dir="ltr" xml:lang="en-US" lang="en-US">
<head>
<meta charset="utf8">
</head>
<body>
<iframe src="http://trackertest.org/browser/browser/base/content/test/protectionsUI/cookieServer.sjs"></iframe>
</body>
</html>

View File

@ -0,0 +1 @@
Content-Security-Policy: sandbox allow-scripts;