OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" |
| 6 |
| 7 #include <memory> |
5 #include <string> | 8 #include <string> |
6 | 9 |
7 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "components/prefs/testing_pref_service.h" | 11 #include "components/prefs/testing_pref_service.h" |
10 #include "ios/chrome/browser/geolocation/location_manager.h" | 12 #include "ios/chrome/browser/geolocation/location_manager.h" |
11 #include "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" | |
12 #include "ios/chrome/test/ios_chrome_scoped_testing_local_state.h" | 13 #include "ios/chrome/test/ios_chrome_scoped_testing_local_state.h" |
13 #include "ios/chrome/test/testing_application_context.h" | 14 #include "ios/chrome/test/testing_application_context.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "testing/gtest_mac.h" | 16 #include "testing/gtest_mac.h" |
16 #include "testing/platform_test.h" | 17 #include "testing/platform_test.h" |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 class OmniboxGeolocationLocalStateTest : public PlatformTest { | 21 class OmniboxGeolocationLocalStateTest : public PlatformTest { |
21 protected: | 22 protected: |
(...skipping 10 matching lines...) Expand all Loading... |
32 | 33 |
33 TEST_F(OmniboxGeolocationLocalStateTest, LastAuthorizationAlertVersion) { | 34 TEST_F(OmniboxGeolocationLocalStateTest, LastAuthorizationAlertVersion) { |
34 EXPECT_TRUE([local_state_ lastAuthorizationAlertVersion].empty()); | 35 EXPECT_TRUE([local_state_ lastAuthorizationAlertVersion].empty()); |
35 | 36 |
36 std::string expectedVersion("fakeVersion"); | 37 std::string expectedVersion("fakeVersion"); |
37 [local_state_ setLastAuthorizationAlertVersion:expectedVersion]; | 38 [local_state_ setLastAuthorizationAlertVersion:expectedVersion]; |
38 EXPECT_EQ(expectedVersion, [local_state_ lastAuthorizationAlertVersion]); | 39 EXPECT_EQ(expectedVersion, [local_state_ lastAuthorizationAlertVersion]); |
39 } | 40 } |
40 | 41 |
41 } // namespace | 42 } // namespace |
OLD | NEW |