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

Unified Diff: chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 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/nacl_host/pnacl_translation_cache_unittest.cc
diff --git a/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc b/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
index 902d9a3207c6ba939ff709d4eb6f9ad475e71f3e..a1b394f32044e3e9797ebdd4384708ce6ebf2637 100644
--- a/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
+++ b/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
@@ -9,7 +9,7 @@
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/test_completion_callback.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,8 +20,7 @@ namespace pnacl_cache {
class PNaClTranslationCacheTest : public testing::Test {
protected:
PNaClTranslationCacheTest()
- : cache_thread_(BrowserThread::CACHE, &message_loop_),
- io_thread_(BrowserThread::IO, &message_loop_) {}
+ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
virtual ~PNaClTranslationCacheTest() {}
virtual void SetUp() { cache_ = new PNaClTranslationCache(); }
virtual void TearDown() {
@@ -36,9 +35,7 @@ class PNaClTranslationCacheTest : public testing::Test {
protected:
PNaClTranslationCache* cache_;
- base::MessageLoopForIO message_loop_;
- content::TestBrowserThread cache_thread_;
- content::TestBrowserThread io_thread_;
+ content::TestBrowserThreadBundle thread_bundle_;
};
TEST_F(PNaClTranslationCacheTest, StoreOneInMem) {

Powered by Google App Engine
This is Rietveld 408576698