| 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 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 13 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" | 12 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" |
| 13 #include "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 14 #include "chrome/browser/ui/confirm_bubble_model.h" | 14 #include "chrome/browser/ui/confirm_bubble_model.h" |
| 15 #import "testing/gtest_mac.h" | 15 #import "testing/gtest_mac.h" |
| 16 #import "ui/gfx/geometry/point.h" | 16 #import "ui/gfx/geometry/point.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // The model object used in this test. This model implements all methods and | 20 // The model object used in this test. This model implements all methods and |
| 21 // updates its status when ConfirmBubbleController calls its methods. | 21 // updates its status when ConfirmBubbleController calls its methods. |
| 22 class TestConfirmBubbleModel : public ConfirmBubbleModel { | 22 class TestConfirmBubbleModel : public ConfirmBubbleModel { |
| 23 public: | 23 public: |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Click its link and verify this view has been removed from the test window. | 179 // Click its link and verify this view has been removed from the test window. |
| 180 // Also verify TestConfirmBubbleModel::LinkClicked() has been called. | 180 // Also verify TestConfirmBubbleModel::LinkClicked() has been called. |
| 181 [bubble clickLink]; | 181 [bubble clickLink]; |
| 182 | 182 |
| 183 contains_bubble_view = [[view subviews] containsObject:bubble]; | 183 contains_bubble_view = [[view subviews] containsObject:bubble]; |
| 184 EXPECT_FALSE(contains_bubble_view); | 184 EXPECT_FALSE(contains_bubble_view); |
| 185 EXPECT_FALSE(accept_clicked()); | 185 EXPECT_FALSE(accept_clicked()); |
| 186 EXPECT_FALSE(cancel_clicked()); | 186 EXPECT_FALSE(cancel_clicked()); |
| 187 EXPECT_TRUE(link_clicked()); | 187 EXPECT_TRUE(link_clicked()); |
| 188 } | 188 } |
| OLD | NEW |