| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" | 10 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" |
| 11 #include "chrome/test/base/ui_test_utils.h" | 11 #include "content/public/test/test_utils.h" |
| 12 #include "ui/views/controls/button/label_button.h" | 12 #include "ui/views/controls/button/label_button.h" |
| 13 #include "ui/views/test/views_test_base.h" | 13 #include "ui/views/test/views_test_base.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 15 | 15 |
| 16 class OneClickSigninBubbleViewTest : public views::ViewsTestBase { | 16 class OneClickSigninBubbleViewTest : public views::ViewsTestBase { |
| 17 public: | 17 public: |
| 18 OneClickSigninBubbleViewTest() | 18 OneClickSigninBubbleViewTest() |
| 19 : on_start_sync_called_(false), | 19 : on_start_sync_called_(false), |
| 20 mode_(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST), | 20 mode_(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST), |
| 21 bubble_learn_more_click_count_(0), | 21 bubble_learn_more_click_count_(0), |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0); | 315 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0); |
| 316 view->AcceleratorPressed(accelerator); | 316 view->AcceleratorPressed(accelerator); |
| 317 | 317 |
| 318 // View should no longer be showing. The message loop will exit once the | 318 // View should no longer be showing. The message loop will exit once the |
| 319 // fade animation of the bubble is done. | 319 // fade animation of the bubble is done. |
| 320 content::RunAllPendingInMessageLoop(); | 320 content::RunAllPendingInMessageLoop(); |
| 321 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); | 321 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); |
| 322 EXPECT_TRUE(on_start_sync_called_); | 322 EXPECT_TRUE(on_start_sync_called_); |
| 323 EXPECT_EQ(OneClickSigninSyncStarter::UNDO_SYNC, mode_); | 323 EXPECT_EQ(OneClickSigninSyncStarter::UNDO_SYNC, mode_); |
| 324 } | 324 } |
| OLD | NEW |