OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 #include "chrome/test/base/ui_test_utils.h" | 6 #include "chrome/test/base/ui_test_utils.h" |
7 | 7 |
8 class GeolocationApiTest : public ExtensionApiTest { | 8 class GeolocationApiTest : public ExtensionApiTest { |
9 public: | 9 public: |
10 GeolocationApiTest() { | 10 GeolocationApiTest() { |
11 } | 11 } |
12 | 12 |
13 // InProcessBrowserTest | 13 // InProcessBrowserTest |
14 virtual void SetUpOnMainThread() OVERRIDE { | 14 virtual void SetUpOnMainThread() override { |
15 ui_test_utils::OverrideGeolocation(0, 0); | 15 ui_test_utils::OverrideGeolocation(0, 0); |
16 } | 16 } |
17 }; | 17 }; |
18 | 18 |
19 // http://crbug.com/68287 | 19 // http://crbug.com/68287 |
20 IN_PROC_BROWSER_TEST_F(GeolocationApiTest, | 20 IN_PROC_BROWSER_TEST_F(GeolocationApiTest, |
21 DISABLED_ExtensionGeolocationAccessFail) { | 21 DISABLED_ExtensionGeolocationAccessFail) { |
22 // Test that geolocation cannot be accessed from extension without permission. | 22 // Test that geolocation cannot be accessed from extension without permission. |
23 ASSERT_TRUE(RunExtensionTest("geolocation/no_permission")) << message_; | 23 ASSERT_TRUE(RunExtensionTest("geolocation/no_permission")) << message_; |
24 } | 24 } |
25 | 25 |
26 // Timing out. http://crbug.com/128412 | 26 // Timing out. http://crbug.com/128412 |
27 IN_PROC_BROWSER_TEST_F(GeolocationApiTest, | 27 IN_PROC_BROWSER_TEST_F(GeolocationApiTest, |
28 DISABLED_ExtensionGeolocationAccessPass) { | 28 DISABLED_ExtensionGeolocationAccessPass) { |
29 // Test that geolocation can be accessed from extension with permission. | 29 // Test that geolocation can be accessed from extension with permission. |
30 ASSERT_TRUE(RunExtensionTest("geolocation/has_permission")) << message_; | 30 ASSERT_TRUE(RunExtensionTest("geolocation/has_permission")) << message_; |
31 } | 31 } |
OLD | NEW |