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

Unified Diff: LayoutTests/inspector/geolocation-emulation-tests.html

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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/geolocation-emulation-tests.html
diff --git a/LayoutTests/inspector/geolocation-emulation-tests.html b/LayoutTests/inspector/geolocation-emulation-tests.html
index 778862c11b4b214b0478dcf8f7ee86eef447142c..08f9455c9d20c25cca205d92cd143d0d85dd3e15 100644
--- a/LayoutTests/inspector/geolocation-emulation-tests.html
+++ b/LayoutTests/inspector/geolocation-emulation-tests.html
@@ -1,8 +1,15 @@
<html>
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
+<script src="../resources/permissions-helper.js"></script>
<script>
+function grantGeolocationPermission() {
whywhat 2015/09/16 15:05:22 you also need to update the expected results for t
+ PermissionsHelper.setPermission('geolocation', 'granted').then(function(p) {
+ console.log("Permission granted.");
+ });
+}
+
function serializeGeolocationError(error) {
var result = "Unknown error"
switch (error.code)
@@ -60,10 +67,13 @@ function overridenTimestampGeolocation()
function test()
{
- if (window.testRunner)
- window.testRunner.setPermission('geolocation', 'granted', location.origin, location.origin);
-
InspectorTest.runTestSuite([
+ function testPermissionGranted(next)
+ {
+ InspectorTest.addConsoleSniffer(next);
+ InspectorTest.evaluateInPage("grantGeolocationPermission()");
+ },
+
function testGeolocationUnavailable(next)
{
InspectorTest.EmulationAgent.setGeolocationOverride();
« no previous file with comments | « no previous file | LayoutTests/resources/permissions-helper.js » ('j') | LayoutTests/resources/permissions-helper.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698