OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_ | |
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_ | |
7 | |
8 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h" | |
9 | |
10 #include <string> | |
11 | |
12 #include "base/basictypes.h" | |
13 #include "base/memory/scoped_ptr.h" | |
14 | |
15 namespace i18n { | |
16 namespace addressinput { | |
17 | |
18 class StorageTestRunner { | |
Evan Stade
2014/06/12 00:18:09
class level comment
please use gerrit instead
2014/06/13 19:22:09
Done.
| |
19 public: | |
20 explicit StorageTestRunner(Storage* storage); | |
21 | |
22 // Runs all the tests from the standard test suite. | |
23 void RunAllTests(); | |
24 | |
25 private: | |
26 void ClearValues(); | |
27 scoped_ptr<Storage::Callback> BuildCallback(); | |
28 void OnDataReady(bool success, | |
29 const std::string& key, | |
30 const std::string& data); | |
31 | |
32 // Test suite. | |
33 void GetWithoutPutReturnsEmptyData(); | |
34 void GetReturnsWhatWasPut(); | |
35 void SecondPutOverwritesData(); | |
36 | |
37 Storage* storage_; // weak | |
38 bool success_; | |
39 std::string key_; | |
40 std::string data_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(StorageTestRunner); | |
43 }; | |
44 | |
45 } // namespace addressinput | |
46 } // namespace i18n | |
47 | |
48 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_ | |
OLD | NEW |