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

Side by Side Diff: LayoutTests/push_messaging/push-messaging-detached-no-crash.html

Issue 735293005: Push API: delete the old layout tests [switchover 1/6] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Accessing navigator.push on a closed window.");
9
10 var jsTestIsAsync = true;
11
12 var win;
13 var nav;
14
15 function processMessage(event) {
16 if (event.data == 'opened') {
17 nav = win.navigator;
18 win.close();
19 win = null;
20 } else if (event.data == 'closed') {
21 nav.push.register().then(function successCallback() {
22 testFailed('Success callback invoked unexpectedly.');
23 finishJSTest();
24 }, function(e) {
25 error = e;
26 shouldBeEqualToString('error.message', 'Document is detached from wi ndow.');
27 finishJSTest();
28 });
29 }
30 }
31
32 if (window.testRunner) {
33 testRunner.dumpAsText();
34 testRunner.setCanOpenWindows();
35 }
36 win = window.open('resources/push-messaging-detached-no-crash-new-window.html');
37 window.addEventListener("message", processMessage, false);
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698