summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller_unittest.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 21:36:10 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 21:36:10 +0000
commitc47ee3fe8eb962680d1597bc1e63c666833f1a57 (patch)
treec6411a90be8806cd84f45edfbffe09a50056441d /chrome/browser/cocoa/toolbar_controller_unittest.mm
parent56c4456f31726d89bcaba8471ff71e097066907d (diff)
downloadchromium_src-c47ee3fe8eb962680d1597bc1e63c666833f1a57.zip
chromium_src-c47ee3fe8eb962680d1597bc1e63c666833f1a57.tar.gz
chromium_src-c47ee3fe8eb962680d1597bc1e63c666833f1a57.tar.bz2
Mac: fix/implement app windows (not app mode), popups, drawing; refactor code.
1. Properly display app windows, including Developer Tools window (no location bar). Also check using --app=http://foobar.com/. 2. Lay out popup windows (in particular, location bar) better. Check using, e.g., <http://www.quirksmode.org/js/popup.html>; make sure it looks good (with a variety of themes). 3. Properly draw border to Omnibox -- so that its border matches the surrounding buttons. Check (looking very closely/zooming) using various themes (Google and artist, light and dark). 4. Re-organize/refactor code in the BrowserWindowController (esp. the layout code). Check that (in a normal window) it still displays the toolbar, bookmark bar (normal and NTP), infobar, and download shelf correctly. BUG=13148,20244,26757,29103 TEST=See above. Review URL: http://codereview.chromium.org/495010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller_unittest.mm')
-rw-r--r--chrome/browser/cocoa/toolbar_controller_unittest.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller_unittest.mm b/chrome/browser/cocoa/toolbar_controller_unittest.mm
index f7a2310..5ce499b 100644
--- a/chrome/browser/cocoa/toolbar_controller_unittest.mm
+++ b/chrome/browser/cocoa/toolbar_controller_unittest.mm
@@ -95,11 +95,11 @@ TEST_F(ToolbarControllerTest, InitialState) {
CompareState(updater, [bar_ toolbarViews]);
}
-// Make sure a "titlebar only" toolbar works
+// Make sure a "titlebar only" toolbar with location bar works.
TEST_F(ToolbarControllerTest, TitlebarOnly) {
NSView* view = [bar_ view];
- [bar_ setHasToolbar:NO];
+ [bar_ setHasToolbar:NO hasLocationBar:YES];
EXPECT_NE(view, [bar_ view]);
// Simulate a popup going fullscreen and back.
@@ -110,13 +110,14 @@ TEST_F(ToolbarControllerTest, TitlebarOnly) {
[view removeFromSuperview];
[superview addSubview:view];
- [bar_ setHasToolbar:YES];
+ [bar_ setHasToolbar:YES hasLocationBar:YES];
EXPECT_EQ(view, [bar_ view]);
// Leave it off to make sure that's fine
- [bar_ setHasToolbar:NO];
+ [bar_ setHasToolbar:NO hasLocationBar:YES];
}
+// TODO(viettrungluu): make a version of above without location bar.
// Make some changes to the enabled state of a few of the buttons and ensure
// that we're still in sync.
@@ -208,7 +209,7 @@ TEST_F(ToolbarControllerTest, TogglePageWrench) {
// having the full toolbar. Also ensure that the location bar doesn't change
// size.
TEST_F(ToolbarControllerTest, DontToggleWhenNoToolbar) {
- [bar_ setHasToolbar:NO];
+ [bar_ setHasToolbar:NO hasLocationBar:YES];
NSView* homeButton = [[bar_ toolbarViews] objectAtIndex:kHomeIndex];
NSView* pageButton = [[bar_ toolbarViews] objectAtIndex:kPageIndex];
NSView* wrenchButton = [[bar_ toolbarViews] objectAtIndex:kWrenchIndex];