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

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

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/extensions/extension_service_test_base.h" 5 #include "chrome/browser/extensions/extension_service_test_base.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } // namespace 66 } // namespace
67 67
68 ExtensionServiceTestBase::ExtensionServiceInitParams:: 68 ExtensionServiceTestBase::ExtensionServiceInitParams::
69 ExtensionServiceInitParams() 69 ExtensionServiceInitParams()
70 : autoupdate_enabled(false), 70 : autoupdate_enabled(false),
71 is_first_run(true), 71 is_first_run(true),
72 profile_is_supervised(false) { 72 profile_is_supervised(false) {
73 } 73 }
74 74
75 ExtensionServiceTestBase::ExtensionServiceTestBase() 75 ExtensionServiceTestBase::ExtensionServiceTestBase()
76 : service_(NULL), 76 : thread_bundle_(new content::TestBrowserThreadBundle(kThreadOptions)),
77 service_(NULL),
77 testing_local_state_(TestingBrowserProcess::GetGlobal()), 78 testing_local_state_(TestingBrowserProcess::GetGlobal()),
78 thread_bundle_(new content::TestBrowserThreadBundle(kThreadOptions)),
79 did_reset_thread_bundle_(false), 79 did_reset_thread_bundle_(false),
80 registry_(NULL) { 80 registry_(NULL) {
81 base::FilePath test_data_dir; 81 base::FilePath test_data_dir;
82 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { 82 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) {
83 ADD_FAILURE(); 83 ADD_FAILURE();
84 return; 84 return;
85 } 85 }
86 data_dir_ = test_data_dir.AppendASCII("extensions"); 86 data_dir_ = test_data_dir.AppendASCII("extensions");
87 } 87 }
88 88
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // interfere with the tests. Those tests that need an external provider 232 // interfere with the tests. Those tests that need an external provider
233 // will register one specifically. 233 // will register one specifically.
234 service_->ClearProvidersForTesting(); 234 service_->ClearProvidersForTesting();
235 235
236 #if defined(OS_CHROMEOS) 236 #if defined(OS_CHROMEOS)
237 InstallLimiter::Get(profile_.get())->DisableForTest(); 237 InstallLimiter::Get(profile_.get())->DisableForTest();
238 #endif 238 #endif
239 } 239 }
240 240
241 } // namespace extensions 241 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_test_base.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698