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

Side by Side Diff: LayoutTests/http/tests/serviceworker/chromium/notificationclick-can-openwindow.html

Issue 1097383006: Notifications: use testRunner.setPermission() in addition of grantWebNotificationPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cleanup
Patch Set: fix expectations Created 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: notificationclick can open new WindowClient</title> 2 <title>Service Worker: notificationclick can open new WindowClient</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/test-helpers.js"></script> 5 <script src="../resources/test-helpers.js"></script>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner) {
8 testRunner.setPermission('notifications', 'granted', location.origin, locati on.origin);
8 testRunner.grantWebNotificationPermission(location.origin, true); 9 testRunner.grantWebNotificationPermission(location.origin, true);
10 }
9 11
10 var t = async_test('notificationclick can open new WindowClient'); 12 var t = async_test('notificationclick can open new WindowClient');
11 t.step(function() { 13 t.step(function() {
12 var scope = 'resources/blank.html' 14 var scope = 'resources/blank.html'
13 service_worker_unregister_and_register( 15 service_worker_unregister_and_register(
14 t, 'resources/notificationclick-can-openwindow.js', scope) 16 t, 'resources/notificationclick-can-openwindow.js', scope)
15 .then(function(registration) { 17 .then(function(registration) {
16 return wait_for_state(t, registration.installing, 'activated'); 18 return wait_for_state(t, registration.installing, 'activated');
17 }) 19 })
18 .then(function() { return with_iframe(scope); }) 20 .then(function() { return with_iframe(scope); })
(...skipping 27 matching lines...) Expand all
46 if (message === 'quit') { 48 if (message === 'quit') {
47 assert_array_equals(result, expected, 49 assert_array_equals(result, expected,
48 'Worker should post back expected messages.'); 50 'Worker should post back expected messages.');
49 service_worker_unregister_and_done(t, scope); 51 service_worker_unregister_and_done(t, scope);
50 } else { 52 } else {
51 result.push(message); 53 result.push(message);
52 } 54 }
53 } 55 }
54 }); 56 });
55 </script> 57 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698