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

Side by Side Diff: LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-404.html

Issue 933153003: Add some image loading layout tests for Web Notifications. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/http/tests/notifications/serviceworkerregistration-document-image-redirect.html » ('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 <html>
3 <head>
4 <title>Notifications: Showing a notification with an image that 404s.</title >
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <script src="../serviceworker/resources/test-helpers.js"></script>
8 <script src="resources/test-helpers.js"></script>
9 </head>
10 <body>
11 <script>
12 // Tests that showing a notification with an image that creates a 404 resp onse
13 // works properly, and does not block the actual display of it.
14
15 async_test(function(test) {
16 var scope = 'resources/scope/' + location.pathname,
17 script = 'resources/instrumentation-service-worker.js';
18
19 testRunner.grantWebNotificationPermission(location.origin, true);
20 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(info) {
21 // (1) Display a Web Notification with an image that 404s.
22 assert_inherits(info.registration, 'showNotification', 'showNotifi cation() must be exposed.');
mlamouri (slow - plz ping) 2015/02/18 20:38:20 Do you need to test that for every new test?
Peter Beverloo 2015/02/18 20:48:23 Removed.
23 return info.registration.showNotification(scope, {
24 body: 'Hello, world!',
25 icon: '/resources/404image.php'
26 });
27 }).then(function() {
28 test.done();
29 }).catch(unreached_rejection(test));
30
31 }, 'Displaying a notification with an image that 404s still resolves the p romise.');
32 </script>
33 </body>
34 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-redirect.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698