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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/insecure-parent-frame.html

Issue 2055433002: Revert of service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="../resources/get-host-info.js?pipe=sub"></script>
6 <script src="resources/test-helpers.js"></script>
7 <title>Page Title</title>
8 <body></body>
9 <script>
10 var host_info = get_host_info();
11
12 var saw_message = new Promise(resolve => {
13 window.addEventListener('message', e => resolve(e.data));
14 });
15
16 // This test registers a service worker, then creates an in-scope
17 // https iframe inside an insecure http iframe. The in-scope iframe
18 // communicates whether it has a controller to the top-level frame.
19 promise_test(t => {
20 var script = 'resources/empty-worker.js';
21 var scope = 'resources/insecure-inscope';
22 return service_worker_unregister_and_register(t, script, scope)
23 .then(reg => {
24 add_completion_callback(() => reg.unregister());
25 return wait_for_state(t, reg.installing, 'activated');
26 })
27 .then(() => {
28 var url = host_info.UNAUTHENTICATED_ORIGIN +
29 '/serviceworker/resources/insecure-parent.html';
30 return with_iframe(url);
31 })
32 .then(() => saw_message)
33 .then(data => assert_equals(data, 'PASS'));
34 }, 'Service worker does not control the subframe of an insecure frame');
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698