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

Side by Side Diff: LayoutTests/resources/permissions-helper.js

Issue 1339123002: Remove some usage of testRunner.setPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@notifications-flakyness
Patch Set: Created 5 years, 3 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 // This file provides a PermissionsHelper object which can be used by 1 // This file provides a PermissionsHelper object which can be used by
2 // LayoutTests using testRunner to handle permissions. The methods in the object 2 // LayoutTests using testRunner to handle permissions. The methods in the object
3 // return promises so can be used to write idiomatic, race-free code. 3 // return promises so can be used to write idiomatic, race-free code.
4 // 4 //
5 // The current available methods are: 5 // The current available methods are:
6 // - setPermission: given a permission name (known by testRunner) and a state, 6 // - setPermission: given a permission name (known by testRunner) and a state,
7 // it will set the permission to the specified state and resolve the promise 7 // it will set the permission to the specified state and resolve the promise
8 // when done. 8 // when done.
9 // Example: 9 // Example:
10 // PermissionsHelper.setPermission('geolocation', 'prompt').then(runTest); 10 // PermissionsHelper.setPermission('geolocation', 'prompt').then(runTest);
(...skipping 24 matching lines...) Expand all
35 if (result.state == state) { 35 if (result.state == state) {
36 resolver() 36 resolver()
37 return; 37 return;
38 } 38 }
39 39
40 result.onchange = function() { 40 result.onchange = function() {
41 result.onchange = null; 41 result.onchange = null;
42 resolver(); 42 resolver();
43 }; 43 };
44 44
45 testRunner.setPermission(name, state, location.origin, location.orig in); 45 testRunner.setPermission(name, state, location.origin, location.orig in);
whywhat 2015/09/16 15:03:09 you haven't really removed setPermission from here
46 }); 46 });
47 }); 47 });
48 } 48 }
49 } 49 }
50 })(); 50 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698