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

Side by Side Diff: chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm

Issue 12254021: Alternate NTP: Resize devtools when hiding bookmark bar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/dev_tools_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" 5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h"
6 6
7 #include "chrome/browser/devtools/devtools_window.h" 7 #include "chrome/browser/devtools/devtools_window.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 DevToolsWindow::ToggleDevToolsWindow(browser(), DEVTOOLS_TOGGLE_ACTION_SHOW); 100 DevToolsWindow::ToggleDevToolsWindow(browser(), DEVTOOLS_TOGGLE_ACTION_SHOW);
101 101
102 NSView* container_view = [[[controller() splitView] subviews] lastObject]; 102 NSView* container_view = [[[controller() splitView] subviews] lastObject];
103 NSView* dev_tools_view = [[container_view subviews] lastObject]; 103 NSView* dev_tools_view = [[container_view subviews] lastObject];
104 NSView* web_view = [[dev_tools_view subviews] lastObject]; 104 NSView* web_view = [[dev_tools_view subviews] lastObject];
105 105
106 CGFloat height = NSHeight([[controller() splitView] bounds]); 106 CGFloat height = NSHeight([[controller() splitView] bounds]);
107 107
108 EXPECT_EQ(height - offset, NSHeight([web_view bounds])); 108 EXPECT_EQ(height - offset, NSHeight([web_view bounds]));
109 EXPECT_EQ(0, NSMinY([web_view bounds])); 109 EXPECT_EQ(0, NSMinY([web_view bounds]));
110
111 // Update the offset and verify that the view is resized.
112 CGFloat new_offset = 25;
dhollowa 2013/02/13 23:31:30 Hmm, snake-case is not obj-c style, but seems to b
sail 2013/02/13 23:49:09 My understanding is that camel case is for code in
113 [controller() setTopContentOffset:new_offset];
114 EXPECT_EQ(height - new_offset, NSHeight([web_view bounds]));
115 EXPECT_EQ(0, NSMinY([web_view bounds]));
110 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/dev_tools_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698