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 "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" | 5 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
11 #include "chrome/test/base/ui_test_utils.h" | 11 #include "chrome/test/base/ui_test_utils.h" |
12 #include "content/public/common/page_transition_types.h" | 12 #include "content/public/common/page_transition_types.h" |
13 #include "ui/views/controls/button/text_button.h" | 13 #include "ui/views/controls/button/label_button.h" |
14 | 14 |
15 class OneClickSigninBubbleViewBrowserTest : public InProcessBrowserTest { | 15 class OneClickSigninBubbleViewBrowserTest : public InProcessBrowserTest { |
16 public: | 16 public: |
17 OneClickSigninBubbleViewBrowserTest() | 17 OneClickSigninBubbleViewBrowserTest() |
18 : on_start_sync_called_(false), | 18 : on_start_sync_called_(false), |
19 mode_(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST) { | 19 mode_(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST) { |
20 } | 20 } |
21 | 21 |
22 OneClickSigninBubbleView* ShowOneClickSigninBubble() { | 22 OneClickSigninBubbleView* ShowOneClickSigninBubble() { |
23 browser()->window()->ShowOneClickSigninBubble( | 23 browser()->window()->ShowOneClickSigninBubble( |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 views::View* view = one_click_view; | 146 views::View* view = one_click_view; |
147 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0); | 147 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0); |
148 view->AcceleratorPressed(accelerator); | 148 view->AcceleratorPressed(accelerator); |
149 | 149 |
150 // View should no longer be showing. The message loop will exit once the | 150 // View should no longer be showing. The message loop will exit once the |
151 // fade animation of the bubble is done. | 151 // fade animation of the bubble is done. |
152 content::RunMessageLoop(); | 152 content::RunMessageLoop(); |
153 EXPECT_FALSE(on_start_sync_called_); | 153 EXPECT_FALSE(on_start_sync_called_); |
154 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); | 154 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); |
155 } | 155 } |
OLD | NEW |