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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-no-manifest-in-service-worker.html

Issue 2152823003: Push: Update sender ID missing error messages for applicationServerKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING Created 4 years, 5 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 | « content/public/common/push_messaging_status.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>subscribe fails in service worker because the manifest cannot be read</ti tle> 4 <title>subscribe fails in service worker because the manifest cannot be read</ti tle>
5 <link rel="manifest" href="resources/push_manifest.json"> 5 <link rel="manifest" href="resources/push_manifest.json">
6 <script src="../resources/testharness.js"></script> 6 <script src="../resources/testharness.js"></script>
7 <script src="../resources/testharnessreport.js"></script> 7 <script src="../resources/testharnessreport.js"></script>
8 <script src="../serviceworker/resources/test-helpers.js"></script> 8 <script src="../serviceworker/resources/test-helpers.js"></script>
9 <script src="../notifications/resources/test-helpers.js"></script> 9 <script src="../notifications/resources/test-helpers.js"></script>
10 </head> 10 </head>
(...skipping 13 matching lines...) Expand all
24 // id has been specified in the manifest, the manifest cannot be rea d in a service 24 // id has been specified in the manifest, the manifest cannot be rea d in a service
25 // worker context, and no previous subscription will exist from a do cument context. 25 // worker context, and no previous subscription will exist from a do cument context.
26 workerInfo.port.postMessage({command: 'subscribe'}); 26 workerInfo.port.postMessage({command: 'subscribe'});
27 27
28 workerInfo.port.addEventListener('message', function(event) { 28 workerInfo.port.addEventListener('message', function(event) {
29 if (typeof event.data != 'object' || !event.data.command) 29 if (typeof event.data != 'object' || !event.data.command)
30 assert_unreached('Invalid message from the service worker'); 30 assert_unreached('Invalid message from the service worker');
31 31
32 assert_equals(event.data.command, 'subscribe'); 32 assert_equals(event.data.command, 'subscribe');
33 assert_false(event.data.success, 'subscribe is not expected to s ucceed.'); 33 assert_false(event.data.success, 'subscribe is not expected to s ucceed.');
34 assert_regexp_match(event.data.errorMessage, 34 assert_regexp_match(
35 /gcm_sender_id not found in manifest/); 35 event.data.errorMessage,
36 /missing applicationServerKey, and gcm_sender_id not found i n manifest/);
36 37
37 test.done(); 38 test.done();
38 }); 39 });
39 }) 40 })
40 .catch(unreached_rejection(test)); 41 .catch(unreached_rejection(test));
41 }, 'subscribe fails in service worker because the manifest cannot be read'); 42 }, 'subscribe fails in service worker because the manifest cannot be read');
42 </script> 43 </script>
43 </body> 44 </body>
44 </html> 45 </html>
OLDNEW
« no previous file with comments | « content/public/common/push_messaging_status.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698