| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h" | 
| 6 | 6 | 
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> | 
| 8 | 8 | 
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" | 
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" | 
| 11 #include "chrome/browser/password_manager/password_store_factory.h" | 11 #include "chrome/browser/password_manager/password_store_factory.h" | 
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" | 
| 13 #include "chrome/browser/ui/browser_command_controller.h" | 13 #include "chrome/browser/ui/browser_command_controller.h" | 
| 14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" | 
| 15 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 15 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 
| 16 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |  | 
| 17 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |  | 
| 18 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 16 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 
| 19 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 17 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 
| 20 #include "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h" | 18 #include "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h" | 
| 21 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h" | 19 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h" | 
|  | 20 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" | 
|  | 21 #include "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 22 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 22 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 
| 23 #include "chrome/browser/ui/tab_dialogs.h" | 23 #include "chrome/browser/ui/tab_dialogs.h" | 
| 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 
| 25 #include "components/password_manager/core/browser/mock_password_store.h" | 25 #include "components/password_manager/core/browser/mock_password_store.h" | 
| 26 #include "components/password_manager/core/browser/password_manager_test_utils.h
     " | 26 #include "components/password_manager/core/browser/password_manager_test_utils.h
     " | 
| 27 #include "content/public/browser/site_instance.h" | 27 #include "content/public/browser/site_instance.h" | 
| 28 #include "content/public/test/test_browser_thread_bundle.h" | 28 #include "content/public/test/test_browser_thread_bundle.h" | 
| 29 #include "content/public/test/web_contents_tester.h" | 29 #include "content/public/test/web_contents_tester.h" | 
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" | 
| 31 #include "testing/gtest_mac.h" | 31 #include "testing/gtest_mac.h" | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 192   EXPECT_FALSE([controller() shouldOpenAsKeyWindow]); | 192   EXPECT_FALSE([controller() shouldOpenAsKeyWindow]); | 
| 193   EXPECT_FALSE([bubbleWindow() defaultButtonCell]); | 193   EXPECT_FALSE([bubbleWindow() defaultButtonCell]); | 
| 194 } | 194 } | 
| 195 | 195 | 
| 196 TEST_F(ManagePasswordsBubbleCocoaTest, OpenWithFocus) { | 196 TEST_F(ManagePasswordsBubbleCocoaTest, OpenWithFocus) { | 
| 197   ShowBubble(true); | 197   ShowBubble(true); | 
| 198   EXPECT_TRUE(ManagePasswordsBubbleCocoa::instance()); | 198   EXPECT_TRUE(ManagePasswordsBubbleCocoa::instance()); | 
| 199   EXPECT_TRUE([controller() shouldOpenAsKeyWindow]); | 199   EXPECT_TRUE([controller() shouldOpenAsKeyWindow]); | 
| 200   EXPECT_TRUE([bubbleWindow() defaultButtonCell]); | 200   EXPECT_TRUE([bubbleWindow() defaultButtonCell]); | 
| 201 } | 201 } | 
| OLD | NEW | 
|---|