mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
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:
parent
58ef92dc3a
commit
6b9a1c976d
@ -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]
|
||||
|
@ -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
|
||||
|
12
browser/base/content/test/protectionsUI/sandboxed.html
Normal file
12
browser/base/content/test/protectionsUI/sandboxed.html
Normal 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>
|
@ -0,0 +1 @@
|
||||
Content-Security-Policy: sandbox allow-scripts;
|
Loading…
Reference in New Issue
Block a user