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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_worker.https.html

Issue 2365353002: Add 'WorkerGlobalScope::isSecureContext' (Closed)
Patch Set: I hate webexposed tests. Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/resources/get-host-info.js"></script>
5 <script>
6 test(function () {
7 assert_true(window.isSecureContext);
8 }, "Sanity-check the test runner.");
9
10 async_test(t => {
11 var w = new Worker("./resources/post-securecontext.js");
12 w.onmessage = t.step_func_done(e => {
13 assert_true(e.data.isSecureContext);
14 });
15 }, "Secure workers are secure.");
16
17 async_test(t => {
18 var url = URL.createObjectURL(new Blob(['postMessage({ "isSecureContext" : self.isSecureContext });']));
19 var w = new Worker(url);
20 w.onmessage = t.step_func_done(e => {
21 assert_true(e.data.isSecureContext);
22 });
23 }, "Secure workers created from 'blob:' are secure.");
24
25 async_test(t => {
26 var w = new SharedWorker("./resources/post-securecontext-shared.js");
27 w.port.onmessage = t.step_func_done(e => {
28 assert_true(e.data.isSecureContext);
29 });
30 }, "Secure shared workers are secure.");
31
32 async_test(t => {
33 var url = URL.createObjectURL(new Blob(['self.onconnect = e => { e.ports [0].postMessage({ "isSecureContext": self.isSecureContext }); };']));
34 var w = new SharedWorker(url);
35 w.port.onmessage = t.step_func_done(e => {
36 assert_true(e.data.isSecureContext);
37 });
38 }, "Secure shared workers created from 'blob:' are secure.");
39 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698