summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-14 15:51:10 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-14 15:51:10 +0000
commitbe3877f74da87b5be2b549f733b5705c9607ec82 (patch)
treea00fa6c37daf0467801e2cbb06660b360a6d449e /chrome/browser/views
parent57a020e92927a379ab514db5836cb4550e6e444b (diff)
downloadchromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.zip
chromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.tar.gz
chromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.tar.bz2
Provides the infrastructure for Browser unit tests that create a
BrowserWindow with only a TabStrip. I also converted two ui tests over to unit tests to make sure it all worked. I had to add a bunch of null checks to Browser and a couple of other places. BUG=none TEST=none Review URL: http://codereview.chromium.org/17386 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/browser_view.cc3
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc3
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 9d2a387..18823fd 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1333,6 +1333,9 @@ void BrowserView::LoadingAnimationCallback() {
void BrowserView::InitHangMonitor() {
PrefService* pref_service = g_browser_process->local_state();
+ if (!pref_service)
+ return;
+
int plugin_message_response_timeout =
pref_service->GetInteger(prefs::kPluginMessageResponseTimeout);
int hung_plugin_detect_freq =
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index eff78d2..c460100 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -848,7 +848,8 @@ void TabStrip::TabInsertedAt(TabContents* contents,
// Don't animate the first tab, it looks weird, and don't animate anything
// if the containing window isn't visible yet.
- if (GetTabCount() > 1 && IsWindowVisible(GetWidget()->GetHWND())) {
+ if (GetTabCount() > 1 && GetWidget() &&
+ IsWindowVisible(GetWidget()->GetHWND())) {
StartInsertTabAnimation(index);
} else {
Layout();