Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1260)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/get-installed-related-apps-on-insecure-origin.html

Issue 2765783002: Restrict Navigator.getInstalledRelatedApps() to secure contexts. (Closed)
Patch Set: fix copypaste Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/get-installed-related-apps-on-insecure-origin.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/get-installed-related-apps-on-insecure-origin.html b/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/get-installed-related-apps-on-insecure-origin.html
new file mode 100644
index 0000000000000000000000000000000000000000..897fcddf696bc5db2f8a84b8c29099869d6224b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/get-installed-related-apps-on-insecure-origin.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>getInstalledRelatedApps on an insecure origin</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/get-host-info.js"></script>
+<script>
+if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
+ window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.pathname;
+} else {
+ test(function(test) {
+ assert_false('getInstalledRelatedApps' in navigator,
+ 'navigator.getInstalledRelatedApps attribute has [SecureContext]');
+ }, 'getInstalledRelatedApps requires a secure context');
+}
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698