OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/memory/scoped_nsobject.h" | 6 #include "base/memory/scoped_nsobject.h" |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 virtual void TearDown() { | 46 virtual void TearDown() { |
47 [controller_ close]; | 47 [controller_ close]; |
48 CocoaTest::TearDown(); | 48 CocoaTest::TearDown(); |
49 } | 49 } |
50 | 50 |
51 void CreateBubble() { | 51 void CreateBubble() { |
52 // The controller cleans up after itself when the window closes. | 52 // The controller cleans up after itself when the window closes. |
53 controller_ = | 53 controller_ = |
54 [[PageInfoBubbleController alloc] initWithPageInfoModel:model_ | 54 [[PageInfoBubbleController alloc] |
55 modelObserver:NULL | 55 initWithPageInfoModel:model_ |
56 parentWindow:test_window()]; | 56 modelObserver:NULL |
| 57 parentWindow:test_window() |
| 58 navigator:NULL]; |
57 window_ = [controller_ window]; | 59 window_ = [controller_ window]; |
58 [controller_ showWindow:nil]; | 60 [controller_ showWindow:nil]; |
59 } | 61 } |
60 | 62 |
61 // Checks the controller's window for the requisite subviews in the given | 63 // Checks the controller's window for the requisite subviews in the given |
62 // numbers. | 64 // numbers. |
63 void CheckWindow(int text_count, | 65 void CheckWindow(int text_count, |
64 int image_count, | 66 int image_count, |
65 int spacer_count, | 67 int spacer_count, |
66 int button_count) { | 68 int button_count) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 NSTextField* desc = static_cast<NSTextField*>(subview); | 201 NSTextField* desc = static_cast<NSTextField*>(subview); |
200 if ([[desc stringValue] isEqualToString:targetDesc]) { | 202 if ([[desc stringValue] isEqualToString:targetDesc]) { |
201 // Typical box frame is ~55px, make sure this is extra large. | 203 // Typical box frame is ~55px, make sure this is extra large. |
202 EXPECT_LT(75, NSHeight([desc frame])); | 204 EXPECT_LT(75, NSHeight([desc frame])); |
203 } | 205 } |
204 } | 206 } |
205 } | 207 } |
206 } | 208 } |
207 | 209 |
208 } // namespace | 210 } // namespace |
OLD | NEW |