| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/extensions/chooser_dialog_cocoa_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/chooser_controller/mock_chooser_controller.h" |
| 13 #import "chrome/browser/ui/cocoa/chooser_content_view_cocoa.h" | 14 #import "chrome/browser/ui/cocoa/chooser_content_view_cocoa.h" |
| 14 #import "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 15 #import "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| 15 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 16 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 16 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h" | 17 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h" |
| 17 #include "components/chooser_controller/mock_chooser_controller.h" | |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "testing/gtest_mac.h" | 20 #include "testing/gtest_mac.h" |
| 21 | 21 |
| 22 class ChooserDialogCocoaControllerTest : public CocoaProfileTest { | 22 class ChooserDialogCocoaControllerTest : public CocoaProfileTest { |
| 23 protected: | 23 protected: |
| 24 ChooserDialogCocoaControllerTest() {} | 24 ChooserDialogCocoaControllerTest() {} |
| 25 ~ChooserDialogCocoaControllerTest() override {} | 25 ~ChooserDialogCocoaControllerTest() override {} |
| 26 | 26 |
| 27 void SetUp() override { | 27 void SetUp() override { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 chooser_controller_->OptionAdded(base::ASCIIToUTF16("c")); | 361 chooser_controller_->OptionAdded(base::ASCIIToUTF16("c")); |
| 362 | 362 |
| 363 // Select option 0 and press "Get help" button. | 363 // Select option 0 and press "Get help" button. |
| 364 [table_view_ selectRowIndexes:[NSIndexSet indexSetWithIndex:0] | 364 [table_view_ selectRowIndexes:[NSIndexSet indexSetWithIndex:0] |
| 365 byExtendingSelection:NO]; | 365 byExtendingSelection:NO]; |
| 366 EXPECT_CALL(*chooser_controller_, Select(testing::_)).Times(0); | 366 EXPECT_CALL(*chooser_controller_, Select(testing::_)).Times(0); |
| 367 EXPECT_CALL(*chooser_controller_, Cancel()).Times(0); | 367 EXPECT_CALL(*chooser_controller_, Cancel()).Times(0); |
| 368 EXPECT_CALL(*chooser_controller_, OpenHelpCenterUrl()).Times(1); | 368 EXPECT_CALL(*chooser_controller_, OpenHelpCenterUrl()).Times(1); |
| 369 [help_button_ performClick:chooser_dialog_controller_]; | 369 [help_button_ performClick:chooser_dialog_controller_]; |
| 370 } | 370 } |
| OLD | NEW |