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

Unified 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: Work in progress for suggestions impl. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/libaddressinput/chromium/storage_test_runner.h
diff --git a/third_party/libaddressinput/chromium/storage_test_runner.h b/third_party/libaddressinput/chromium/storage_test_runner.h
new file mode 100644
index 0000000000000000000000000000000000000000..a987f3cfe43677f647003f75e74a7ef097566179
--- /dev/null
+++ b/third_party/libaddressinput/chromium/storage_test_runner.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_
+#define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_
+
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace i18n {
+namespace addressinput {
+
+class StorageTestRunner {
Evan Stade 2014/06/12 00:18:09 class level comment
please use gerrit instead 2014/06/13 19:22:09 Done.
+ public:
+ explicit StorageTestRunner(Storage* storage);
+
+ // Runs all the tests from the standard test suite.
+ void RunAllTests();
+
+ private:
+ void ClearValues();
+ scoped_ptr<Storage::Callback> BuildCallback();
+ void OnDataReady(bool success,
+ const std::string& key,
+ const std::string& data);
+
+ // Test suite.
+ void GetWithoutPutReturnsEmptyData();
+ void GetReturnsWhatWasPut();
+ void SecondPutOverwritesData();
+
+ Storage* storage_; // weak
+ bool success_;
+ std::string key_;
+ std::string data_;
+
+ DISALLOW_COPY_AND_ASSIGN(StorageTestRunner);
+};
+
+} // namespace addressinput
+} // namespace i18n
+
+#endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_STORAGE_TEST_RUNNER_H_

Powered by Google App Engine
This is Rietveld 408576698