summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc8
-rw-r--r--content/browser/renderer_host/render_process_host.cc1
-rw-r--r--content/browser/site_instance_unittest.cc6
3 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
index 93a284c..f7dbd76 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -54,6 +54,10 @@ class FaviconDelegate : public ui::MenuModelDelegate {
class BackFwdMenuModelTest : public RenderViewHostTestHarness {
public:
+ BackFwdMenuModelTest()
+ : ui_thread_(BrowserThread::UI, &message_loop_) {
+ }
+
void ValidateModel(BackForwardMenuModel* model, int history_items,
int chapter_stops) {
int h = std::min(BackForwardMenuModel::kMaxHistoryItems, history_items);
@@ -94,6 +98,8 @@ class BackFwdMenuModelTest : public RenderViewHostTestHarness {
controller().GoForward();
contents()->CommitPendingNavigation();
}
+
+ BrowserThread ui_thread_;
};
TEST_F(BackFwdMenuModelTest, BasicCase) {
diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc
index 25188d2..cf380ab 100644
--- a/content/browser/renderer_host/render_process_host.cc
+++ b/content/browser/renderer_host/render_process_host.cc
@@ -156,6 +156,7 @@ bool RenderProcessHost::FastShutdownForPageCount(size_t count) {
// static
RenderProcessHost::iterator RenderProcessHost::AllHostsIterator() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return iterator(&all_hosts);
}
diff --git a/content/browser/site_instance_unittest.cc b/content/browser/site_instance_unittest.cc
index 5ba3919..24b7cd3 100644
--- a/content/browser/site_instance_unittest.cc
+++ b/content/browser/site_instance_unittest.cc
@@ -9,6 +9,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/testing_profile.h"
+#include "content/browser/browser_thread.h"
#include "content/browser/browsing_instance.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/content_browser_client.h"
@@ -50,7 +51,9 @@ class SiteInstanceTestBrowserClient : public content::ContentBrowserClient {
class SiteInstanceTest : public testing::Test {
public:
- SiteInstanceTest() : old_browser_client_(NULL) {
+ SiteInstanceTest()
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ old_browser_client_(NULL) {
}
virtual void SetUp() {
@@ -64,6 +67,7 @@ class SiteInstanceTest : public testing::Test {
private:
MessageLoopForUI message_loop_;
+ BrowserThread ui_thread_;
SiteInstanceTestBrowserClient browser_client_;
content::ContentBrowserClient* old_browser_client_;