OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mac/scoped_nsobject.h" | |
7 #include "base/memory/scoped_ptr.h" | |
8 #include "base/strings/string16.h" | 6 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
11 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" | 9 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" |
12 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h" | 10 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h" |
13 #include "chrome/browser/ui/confirm_bubble_model.h" | 11 #include "chrome/browser/ui/confirm_bubble_model.h" |
14 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
15 #import "testing/gtest_mac.h" | 13 #import "testing/gtest_mac.h" |
16 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
17 #import "ui/gfx/point.h" | 15 #import "ui/gfx/point.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Click its link and verify this view has been removed from the test window. | 183 // Click its link and verify this view has been removed from the test window. |
186 // Also verify TestConfirmBubbleModel::LinkClicked() has been called. | 184 // Also verify TestConfirmBubbleModel::LinkClicked() has been called. |
187 [bubble clickLink]; | 185 [bubble clickLink]; |
188 | 186 |
189 contains_bubble_view = [[view subviews] containsObject:bubble]; | 187 contains_bubble_view = [[view subviews] containsObject:bubble]; |
190 EXPECT_FALSE(contains_bubble_view); | 188 EXPECT_FALSE(contains_bubble_view); |
191 EXPECT_FALSE(accept_clicked()); | 189 EXPECT_FALSE(accept_clicked()); |
192 EXPECT_FALSE(cancel_clicked()); | 190 EXPECT_FALSE(cancel_clicked()); |
193 EXPECT_TRUE(link_clicked()); | 191 EXPECT_TRUE(link_clicked()); |
194 } | 192 } |
OLD | NEW |