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

Side by Side Diff: content/test/notifications/notification_test_utils.js

Issue 1050623003: Move the Notification browser tests down to //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-Integrate
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Returns a promise that will be resolved with an activated Service 5 // Returns a promise that will be resolved with an activated Service
6 // Worker, or rejects when the Service Worker could not be started. There 6 // Worker, or rejects when the Service Worker could not be started. There
7 // will be a message port to and from the worker in |messagePort|. 7 // will be a message port to and from the worker in |messagePort|.
8 function GetActivatedServiceWorker(script, scope) { 8 function GetActivatedServiceWorker(script, scope) {
9 return navigator.serviceWorker.getRegistration(scope) 9 return navigator.serviceWorker.getRegistration(scope)
10 .then(function(registration) { 10 .then(function(registration) {
(...skipping 26 matching lines...) Expand all
37 }); 37 });
38 38
39 registration.active.postMessage(channel.port2, 39 registration.active.postMessage(channel.port2,
40 [ channel.port2 ]); 40 [ channel.port2 ]);
41 41
42 messagePort = channel.port1; 42 messagePort = channel.port1;
43 messagePort.start(); 43 messagePort.start();
44 }); 44 });
45 }); 45 });
46 } 46 }
OLDNEW
« no previous file with comments | « content/browser/notifications/notification_message_filter.cc ('k') | content/test/notifications/service_worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698