OLD | NEW |
---|---|
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 Loading... | |
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 } |
OLD | NEW |