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

Side by Side Diff: chrome/browser/extensions/extension_prefs_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 4 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "chrome/browser/extensions/extension_prefs.h" 11 #include "chrome/browser/extensions/extension_prefs.h"
12 #include "chrome/browser/extensions/test_extension_prefs.h" 12 #include "chrome/browser/extensions/test_extension_prefs.h"
13 #include "chrome/browser/prefs/pref_change_registrar.h" 13 #include "chrome/browser/prefs/pref_change_registrar.h"
14 #include "chrome/browser/prefs/scoped_user_pref_update.h" 14 #include "chrome/browser/prefs/scoped_user_pref_update.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/extensions/extension_constants.h" 16 #include "chrome/common/extensions/extension_constants.h"
17 #include "chrome/common/extensions/extension_permission_set.h" 17 #include "chrome/common/extensions/extension_permission_set.h"
18 #include "chrome/test/base/testing_browser_process_test.h"
19 #include "content/browser/browser_thread.h" 18 #include "content/browser/browser_thread.h"
20 #include "content/common/notification_details.h" 19 #include "content/common/notification_details.h"
21 #include "content/common/notification_observer_mock.h" 20 #include "content/common/notification_observer_mock.h"
22 #include "content/common/notification_source.h" 21 #include "content/common/notification_source.h"
23 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
24 23
25 using base::Time; 24 using base::Time;
26 using base::TimeDelta; 25 using base::TimeDelta;
27 26
28 namespace { 27 namespace {
(...skipping 10 matching lines...) Expand all
39 const char kDefaultPref4[] = "default pref 4"; 38 const char kDefaultPref4[] = "default pref 4";
40 39
41 } // namespace 40 } // namespace
42 41
43 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { 42 static void AddPattern(URLPatternSet* extent, const std::string& pattern) {
44 int schemes = URLPattern::SCHEME_ALL; 43 int schemes = URLPattern::SCHEME_ALL;
45 extent->AddPattern(URLPattern(schemes, pattern)); 44 extent->AddPattern(URLPattern(schemes, pattern));
46 } 45 }
47 46
48 // Base class for tests. 47 // Base class for tests.
49 class ExtensionPrefsTest : public TestingBrowserProcessTest { 48 class ExtensionPrefsTest : public testing::Test {
50 public: 49 public:
51 ExtensionPrefsTest() 50 ExtensionPrefsTest()
52 : ui_thread_(BrowserThread::UI, &message_loop_), 51 : ui_thread_(BrowserThread::UI, &message_loop_),
53 file_thread_(BrowserThread::FILE, &message_loop_) { 52 file_thread_(BrowserThread::FILE, &message_loop_) {
54 } 53 }
55 54
56 // This function will get called once, and is the right place to do operations 55 // This function will get called once, and is the right place to do operations
57 // on ExtensionPrefs that write data. 56 // on ExtensionPrefs that write data.
58 virtual void Initialize() = 0; 57 virtual void Initialize() = 0;
59 58
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 testing::Mock::VerifyAndClearExpectations(v1i); 1093 testing::Mock::VerifyAndClearExpectations(v1i);
1095 testing::Mock::VerifyAndClearExpectations(v2); 1094 testing::Mock::VerifyAndClearExpectations(v2);
1096 testing::Mock::VerifyAndClearExpectations(v2i); 1095 testing::Mock::VerifyAndClearExpectations(v2i);
1097 } 1096 }
1098 1097
1099 virtual void Verify() { 1098 virtual void Verify() {
1100 } 1099 }
1101 }; 1100 };
1102 TEST_F(ExtensionPrefsSetExtensionControlledPref, 1101 TEST_F(ExtensionPrefsSetExtensionControlledPref,
1103 ExtensionPrefsSetExtensionControlledPref) {} 1102 ExtensionPrefsSetExtensionControlledPref) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698