blob: 2bf832dd0fcdea9bbdbea08f23a0c38b924ee063 [file] [log] [blame]
[email protected]4d2451652012-02-14 23:54:261// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]10e59f3132010-03-04 11:12:432// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/extensions/extension_apitest.h"
[email protected]02a5fe292012-04-25 21:47:566#include "chrome/test/base/ui_test_utils.h"
[email protected]10e59f3132010-03-04 11:12:437
8class GeolocationApiTest : public ExtensionApiTest {
[email protected]0bc24b52011-01-11 01:19:479 public:
[email protected]f7f98192012-01-24 17:10:2610 GeolocationApiTest() {
[email protected]10e59f3132010-03-04 11:12:4311 }
[email protected]b7d6acc2011-02-03 11:01:5012
13 // InProcessBrowserTest
[email protected]02a5fe292012-04-25 21:47:5614 virtual void SetUpOnMainThread() {
15 ui_test_utils::OverrideGeolocation(0, 0);
[email protected]b7d6acc2011-02-03 11:01:5016 }
[email protected]10e59f3132010-03-04 11:12:4317};
18
[email protected]4d2451652012-02-14 23:54:2619// http://crbug.com/68287
[email protected]0bc24b52011-01-11 01:19:4720IN_PROC_BROWSER_TEST_F(GeolocationApiTest,
[email protected]4d2451652012-02-14 23:54:2621 DISABLED_ExtensionGeolocationAccessFail) {
[email protected]5ab79b02010-04-26 16:47:1122 // Test that geolocation cannot be accessed from extension without permission.
23 ASSERT_TRUE(RunExtensionTest("geolocation/no_permission")) << message_;
24}
25
[email protected]dea2cca2012-05-21 20:33:3226// Timing out. http://crbug.com/128412
[email protected]6e74bf992012-05-17 11:21:2027IN_PROC_BROWSER_TEST_F(GeolocationApiTest,
[email protected]dea2cca2012-05-21 20:33:3228 DISABLED_ExtensionGeolocationAccessPass) {
[email protected]5ab79b02010-04-26 16:47:1129 // Test that geolocation can be accessed from extension with permission.
30 ASSERT_TRUE(RunExtensionTest("geolocation/has_permission")) << message_;
[email protected]10e59f3132010-03-04 11:12:4331}