summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 09:04:37 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 09:04:37 +0000
commite676f8f0050863331707210c9457162e03563ce3 (patch)
tree604fb9098821831debfe19c5044c2f19106e53c6 /chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
parent56b7e39f89c80273f23b4a0fe5aaa14431d16745 (diff)
downloadchromium_src-e676f8f0050863331707210c9457162e03563ce3.zip
chromium_src-e676f8f0050863331707210c9457162e03563ce3.tar.gz
chromium_src-e676f8f0050863331707210c9457162e03563ce3.tar.bz2
Refactor APIPermission to separate out specific permission registration.
Adds a delegate to the PermissionsInfo global to do the specific registration; adds a ScopedTestingPermissionsInfo for unit tests. Preparation for moving permissions to top-level extensions. Also adds a base class for unittests, ExtensionTest, to deal with manifest handler / permission setup. BUG=162530,172712 Review URL: https://chromiumcodereview.appspot.com/13370002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/storage/settings_frontend_unittest.cc')
-rw-r--r--chrome/browser/extensions/api/storage/settings_frontend_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
index d572711..08f3986 100644
--- a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/extensions/api/storage/settings_test_util.h"
#include "chrome/browser/value_store/value_store.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/extensions/extension_unittest.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -49,14 +50,15 @@ scoped_ptr<Value> CreateMegabyte() {
}
-class ExtensionSettingsFrontendTest : public testing::Test {
+class ExtensionSettingsFrontendTest : public ExtensionTest {
public:
- ExtensionSettingsFrontendTest()
+ ExtensionSettingsFrontendTest()
: storage_factory_(new util::ScopedSettingsStorageFactory()),
ui_thread_(BrowserThread::UI, MessageLoop::current()),
file_thread_(BrowserThread::FILE, MessageLoop::current()) {}
virtual void SetUp() OVERRIDE {
+ ExtensionTest::SetUp();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
profile_.reset(new util::MockProfile(temp_dir_.path()));
ResetFrontend();
@@ -67,6 +69,7 @@ class ExtensionSettingsFrontendTest : public testing::Test {
profile_.reset();
// Execute any pending deletion tasks.
message_loop_.RunUntilIdle();
+ ExtensionTest::TearDown();
}
protected: