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

Side by Side Diff: LayoutTests/fast/serviceworker/access-container-with-invalid-context.html

Issue 217023003: Add null checks in navigator.serviceWorker access to fix possible crash (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reverted iframe change Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/serviceworker/access-container-with-invalid-context-expected.txt » ('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 <div id="container"></div>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 var test = async_test("This test checks if accessing navigator.serviceWorker doe sn't crash with invalid frame");
7
8 if (testRunner)
9 testRunner.setCanOpenWindows();
10
11 function callback() {
12 // At this time window.navigator may be replaced with a new iframe's one,
13 // which could be now invalid.
14 var sw = navigator.serviceWorker;
15 test.done();
16 }
17
18 test.step(function() {
19 var w = window.open("x", "y");
20 window.navigator = w.navigator;
21 setTimeout(callback, 1);
22 });
23 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/serviceworker/access-container-with-invalid-context-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698