| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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] | 54 [[PageInfoBubbleController alloc] |
| 55 initWithPageInfoModel:model_ | 55 initWithPageInfoModel:model_ |
| 56 modelObserver:NULL | 56 modelObserver:NULL |
| 57 parentWindow:test_window() | 57 parentWindow:test_window() |
| 58 webContents:NULL |
| 58 navigator:NULL]; | 59 navigator:NULL]; |
| 59 window_ = [controller_ window]; | 60 window_ = [controller_ window]; |
| 60 [controller_ showWindow:nil]; | 61 [controller_ showWindow:nil]; |
| 61 } | 62 } |
| 62 | 63 |
| 63 // Checks the controller's window for the requisite subviews in the given | 64 // Checks the controller's window for the requisite subviews in the given |
| 64 // numbers. | 65 // numbers. |
| 65 void CheckWindow(int text_count, | 66 void CheckWindow(int text_count, |
| 66 int image_count, | 67 int image_count, |
| 67 int spacer_count, | 68 int spacer_count, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 NSTextField* desc = static_cast<NSTextField*>(subview); | 202 NSTextField* desc = static_cast<NSTextField*>(subview); |
| 202 if ([[desc stringValue] isEqualToString:targetDesc]) { | 203 if ([[desc stringValue] isEqualToString:targetDesc]) { |
| 203 // Typical box frame is ~55px, make sure this is extra large. | 204 // Typical box frame is ~55px, make sure this is extra large. |
| 204 EXPECT_LT(75, NSHeight([desc frame])); | 205 EXPECT_LT(75, NSHeight([desc frame])); |
| 205 } | 206 } |
| 206 } | 207 } |
| 207 } | 208 } |
| 208 } | 209 } |
| 209 | 210 |
| 210 } // namespace | 211 } // namespace |
| OLD | NEW |