OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.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 "chrome/browser/tab_contents/infobar_delegate.h" | 10 #include "chrome/browser/tab_contents/infobar_delegate.h" |
11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
12 #import "chrome/browser/ui/cocoa/infobar_container_controller.h" | 12 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
13 #import "chrome/browser/ui/cocoa/infobar_controller.h" | 13 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" |
14 #include "chrome/browser/ui/cocoa/infobar_test_helper.h" | 14 #include "chrome/browser/ui/cocoa/infobars/infobar_test_helper.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
17 | 17 |
18 @interface InfoBarController (ExposedForTesting) | 18 @interface InfoBarController (ExposedForTesting) |
19 - (NSString*)labelString; | 19 - (NSString*)labelString; |
20 - (NSRect)labelFrame; | 20 - (NSRect)labelFrame; |
21 @end | 21 @end |
22 | 22 |
23 @implementation InfoBarController (ExposedForTesting) | 23 @implementation InfoBarController (ExposedForTesting) |
24 - (NSString*)labelString { | 24 - (NSString*)labelString { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // Check that clicking on the link calls LinkClicked() on the | 275 // Check that clicking on the link calls LinkClicked() on the |
276 // delegate. It should not close the infobar. | 276 // delegate. It should not close the infobar. |
277 [controller_ linkClicked]; | 277 [controller_ linkClicked]; |
278 EXPECT_FALSE(delegate_.ok_clicked); | 278 EXPECT_FALSE(delegate_.ok_clicked); |
279 EXPECT_FALSE(delegate_.cancel_clicked); | 279 EXPECT_FALSE(delegate_.cancel_clicked); |
280 EXPECT_TRUE(delegate_.link_clicked); | 280 EXPECT_TRUE(delegate_.link_clicked); |
281 EXPECT_FALSE(delegate_.closed); | 281 EXPECT_FALSE(delegate_.closed); |
282 } | 282 } |
283 | 283 |
284 } // namespace | 284 } // namespace |
OLD | NEW |