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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/durable-storage-on-insecure-origin.html

Issue 2692633002: Use [SecureContext] for navigator.storage (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Request Durable Storage On An Insecure Origin</title> 2 <title>Request Durable Storage On An Insecure Origin</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script src="/resources/get-host-info.js"></script> 5 <script src="/resources/get-host-info.js"></script>
6 <script> 6 <script>
7 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { 7 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
8 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.p athname; 8 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.pat hname;
9 } else { 9 } else {
10 promise_test(function(test) { 10 test(function(test) {
11 return promise_rejects(test, 'SecurityError', navigator.storage.persist( )); 11 assert_false('storage' in navigator,
12 }, "Requires secure context"); 12 'navigator.storage attribute has [SecureContext]');
13 }, 'Requires secure context');
Mike West 2017/02/14 12:39:25 Nit: Are there Web Platform Tests for this feature
jsbell 2017/02/14 18:34:47 We should add a suite/migrate our tests; I'll do t
13 } 14 }
14 </script> 15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698