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.
5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_
8 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h"
17 // A test sutie for ::i18n::addressinput::Storage.
18 class StorageTestRunner
{
20 // Does not take ownership of |storage|.
21 explicit StorageTestRunner(::i18n::addressinput::Storage
* storage
);
24 // Runs all the tests from the standard test suite.
29 scoped_ptr
< ::i18n::addressinput::Storage::Callback
> BuildCallback();
30 void OnDataReady(bool success
, const std::string
& key
, std::string
* data
);
33 void GetWithoutPutReturnsEmptyData();
34 void GetReturnsWhatWasPut();
35 void SecondPutOverwritesData();
37 ::i18n::addressinput::Storage
* storage_
; // weak
42 DISALLOW_COPY_AND_ASSIGN(StorageTestRunner
);
45 } // namespace autofill
47 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_