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

Unified Diff: chrome/browser/extensions/sandboxed_unpacker_unittest.cc

Issue 128993004: Fix subtle bug with the in-process utility thread usage in unit tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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/sandboxed_unpacker_unittest.cc
===================================================================
--- chrome/browser/extensions/sandboxed_unpacker_unittest.cc (revision 243741)
+++ chrome/browser/extensions/sandboxed_unpacker_unittest.cc (working copy)
@@ -12,7 +12,6 @@
#include "base/values.h"
#include "chrome/browser/extensions/sandboxed_unpacker.h"
#include "chrome/common/chrome_paths.h"
-#include "content/public/browser/render_process_host.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/constants.h"
@@ -61,9 +60,10 @@
ASSERT_TRUE(extensions_dir_.CreateUniqueTempDir());
browser_threads_.reset(new content::TestBrowserThreadBundle(
content::TestBrowserThreadBundle::IO_MAINLOOP));
+ in_process_utility_thread_helper_.reset(
+ new content::InProcessUtilityThreadHelper);
// It will delete itself.
client_ = new MockSandboxedUnpackerClient;
- content::RenderProcessHost::SetRunRendererInProcess(true);
}
virtual void TearDown() {
@@ -71,7 +71,6 @@
// it posts a task to it.
sandboxed_unpacker_ = NULL;
base::RunLoop().RunUntilIdle();
- content::RenderProcessHost::SetRunRendererInProcess(false);
}
void SetupUnpacker(const std::string& crx_name) {
@@ -105,6 +104,8 @@
MockSandboxedUnpackerClient* client_;
scoped_refptr<SandboxedUnpacker> sandboxed_unpacker_;
scoped_ptr<content::TestBrowserThreadBundle> browser_threads_;
+ scoped_ptr<content::InProcessUtilityThreadHelper>
+ in_process_utility_thread_helper_;
};
TEST_F(SandboxedUnpackerTest, NoCatalogsSuccess) {

Powered by Google App Engine
This is Rietveld 408576698