This repository has been archived by the owner on Jul 18, 2018. It is now read-only.
forked from ChromiumWebApps/chromium
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of [Battery] Allow usage from SecureContext or top-level brows…
…ing context only. (patchset #6 id:160001 of https://codereview.chromium.org/2880763002/ ) Reason for revert: This CL should have gotten a API OWNER lgtm with an Intent to Ship. If the change is accepted by the API OWNERS, we should re-land this. Original issue's description: > [Battery] Allow usage from SecureContext or top-level browsing context only. > > Make the Battery Status API available only within a secure context that is > also a top-level browsing context. This disallows the use of the API within > framed content, as well as from any content that is not a secure context. > > Details: w3c/battery#10 > > WPT updated in web-platform-tests/wpt#5871 > > BUG=661792 > > Review-Url: https://codereview.chromium.org/2880763002 > Cr-Commit-Position: refs/heads/master@{#476263} > Committed: https://chromium.googlesource.com/chromium/src/+/3543d97ca7a33fb8ad48261ad252428555747896 [email protected],[email protected],[email protected] # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=661792 Review-Url: https://codereview.chromium.org/2937553005 Cr-Commit-Position: refs/heads/master@{#479025}
- Loading branch information
1 parent
78cedc3
commit f5f500c
Showing
5 changed files
with
16 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-iframe.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
FAIL throw a 'SecurityError' when invoking navigator.getBattery() within iframe assert_unreached: Should have rejected: undefined Reached unreachable code | ||
Harness: the test ran to completion. | ||
|
4 changes: 4 additions & 0 deletions
4
...arty/WebKit/LayoutTests/external/wpt/battery-status/battery-insecure-context-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
FAIL navigator.getBattery() shall throw a 'SecurityError' in an insecure context assert_unreached: Should have rejected: undefined Reached unreachable code | ||
Harness: the test ran to completion. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters