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

Unified Diff: chrome/browser/extensions/extension_settings_storage_unittest.h

Issue 7189029: Implement an initial extension settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: dgrogan comments #2, mihai comments #1 Created 9 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: chrome/browser/extensions/extension_settings_storage_unittest.h
diff --git a/chrome/browser/extensions/extension_settings_storage_unittest.h b/chrome/browser/extensions/extension_settings_storage_unittest.h
new file mode 100644
index 0000000000000000000000000000000000000000..3b890da0b0663774fbeac4639e3d5bc24dd644e3
--- /dev/null
+++ b/chrome/browser/extensions/extension_settings_storage_unittest.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2011 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_UNITTEST_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_UNITTEST_H_
+#pragma once
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+#include "base/file_util.h"
+#include "base/message_loop.h"
+#include "base/task.h"
+#include "chrome/browser/extensions/extension_settings.h"
+#include "content/browser/browser_thread.h"
+
+// Parameter type for the value-parameterized tests.
+typedef void (*ExtensionSettingsStorageTestParam)(
+ ExtensionSettings* settings,
+ const std::string& extension_id,
+ ExtensionSettings::Callback* callback);
+
+// Test fixture for ExtensionSettingsStorage tests. Tests are defined in
+// extension_settings_storage_unittest.cc with configurations for both cached
+// and non-cached leveldb storage, and cached no-op storage.
+class ExtensionSettingsStorageTest
+ : public testing::TestWithParam<ExtensionSettingsStorageTestParam> {
+ public:
+ virtual void SetUp() OVERRIDE;
+ virtual void TearDown() OVERRIDE;
+
+ protected:
+ ExtensionSettingsStorage* storage_;
+
+ private:
+ ExtensionSettings* settings_;
+ MessageLoopForUI* ui_message_loop_;
+ BrowserThread* ui_thread_;
+ BrowserThread* file_thread_;
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_UNITTEST_H_

Powered by Google App Engine
This is Rietveld 408576698