| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "third_party/libaddressinput/chromium/chrome_storage_impl.h" | 5 #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/prefs/value_map_pref_store.h" | 9 #include "base/prefs/value_map_pref_store.h" |
| 10 #include "cpp/test/storage_test_runner.h" | 10 #include "cpp/test/storage_test_runner.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 #include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/callb
ack.h" |
| 13 namespace { | |
| 14 | 13 |
| 15 // Tests for ChromeStorageImpl object. | 14 // Tests for ChromeStorageImpl object. |
| 16 class ChromeStorageImplTest : public testing::Test { | 15 class ChromeStorageImplTest : public testing::Test { |
| 17 protected: | 16 protected: |
| 18 ChromeStorageImplTest() | 17 ChromeStorageImplTest() |
| 19 : store_(new ValueMapPrefStore()), | 18 : store_(new ValueMapPrefStore()), |
| 20 storage_(store_.get()), | 19 storage_(store_.get()), |
| 21 runner_(&storage_) {} | 20 runner_(&storage_) {} |
| 22 | 21 |
| 23 virtual ~ChromeStorageImplTest() {} | 22 virtual ~ChromeStorageImplTest() {} |
| 24 | 23 |
| 25 scoped_refptr<ValueMapPrefStore> store_; | 24 scoped_refptr<ValueMapPrefStore> store_; |
| 26 ChromeStorageImpl storage_; | 25 ChromeStorageImpl storage_; |
| 27 i18n::addressinput::StorageTestRunner runner_; | 26 i18n::addressinput::StorageTestRunner runner_; |
| 28 }; | 27 }; |
| 29 | 28 |
| 30 TEST_F(ChromeStorageImplTest, StandardStorageTests) { | 29 TEST_F(ChromeStorageImplTest, StandardStorageTests) { |
| 31 EXPECT_NO_FATAL_FAILURE(runner_.RunAllTests()); | 30 EXPECT_NO_FATAL_FAILURE(runner_.RunAllTests()); |
| 32 } | 31 } |
| 33 | |
| 34 } // namespace | |
| OLD | NEW |