Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: third_party/libaddressinput/chromium/storage_test_runner.h

Issue 298863012: Use upstream libaddressinput in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 autofill {
16
17 // A test sutie for ::i18n::addressinput::Storage.
18 class StorageTestRunner {
19 public:
20 // Does not take ownership of |storage|.
21 explicit StorageTestRunner(::i18n::addressinput::Storage* storage);
22 ~StorageTestRunner();
23
24 // Runs all the tests from the standard test suite.
25 void RunAllTests();
26
27 private:
28 void ClearValues();
29 scoped_ptr< ::i18n::addressinput::Storage::Callback> BuildCallback();
30 void OnDataReady(bool success,
31 const std::string& key,
32 const std::string& data);
33
34 // Test suite.
35 void GetWithoutPutReturnsEmptyData();
36 void GetReturnsWhatWasPut();
37 void SecondPutOverwritesData();
38
39 ::i18n::addressinput::Storage* storage_; // weak
40 bool success_;
41 std::string key_;
42 std::string data_;
43
44 DISALLOW_COPY_AND_ASSIGN(StorageTestRunner);
45 };
46
47 } // namespace autofill
48
49 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698