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

Unified Diff: chrome/browser/ui/views/frame/browser_view_unittest.cc

Issue 138943006: Remove a bunch of dead files after the win aura switch. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/ui/views/frame/browser_view_unittest.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view_unittest.cc (revision 244941)
+++ chrome/browser/ui/views/frame/browser_view_unittest.cc (working copy)
@@ -14,14 +14,12 @@
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/common/url_constants.h"
+#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/single_split_view.h"
#include "ui/views/controls/webview/webview.h"
-#if defined(OS_WIN)
-#include "chrome/browser/ui/views/frame/browser_frame_win.h"
-#endif
-
namespace {
// Tab strip bounds depend on the window frame sizes.
@@ -166,7 +164,7 @@
BookmarkBarView::DisableAnimationsForTesting(false);
}
-#if defined(OS_WIN) && !defined(USE_AURA)
+#if defined(OS_WIN)
// This class provides functionality to test the incognito window/normal window
// switcher button which is added to Windows 8 metro Chrome.
@@ -223,8 +221,22 @@
GetProfile()->SetOffTheRecordProfile(builder.Build());
browser_view_ = new TestBrowserView();
- browser_view_->SetWindowSwitcherButton(
- MakeWindowSwitcherButton(NULL, false));
+
+ views::ImageButton* switcher_button = new views::ImageButton(NULL);
+ // The button in the incognito window has the hot-cold images inverted
+ // with respect to the regular browser window.
+ switcher_button->SetImage(
+ views::ImageButton::STATE_NORMAL,
+ ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_INCOGNITO_SWITCH_OFF));
+ switcher_button->SetImage(
+ views::ImageButton::STATE_HOVERED,
+ ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_INCOGNITO_SWITCH_ON));
+ switcher_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
+ views::ImageButton::ALIGN_MIDDLE);
+
+ browser_view_->SetWindowSwitcherButton(switcher_button);
return browser_view_;
}
@@ -242,7 +254,6 @@
TEST_F(BrowserViewIncognitoSwitcherTest,
BrowserViewIncognitoSwitcherEventHandlerTest) {
// |browser_view_| owns the Browser, not the test class.
- EXPECT_FALSE(browser());
EXPECT_TRUE(browser_view()->browser());
// Test initial state.
EXPECT_TRUE(browser_view()->IsTabStripVisible());
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698