Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); 62 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing());
63 } 63 }
64 64
65 // Disabled. See http://crbug.com/132348 65 // Disabled. See http://crbug.com/132348
66 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleViewBrowserTest, DISABLED_OkButton) { 66 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleViewBrowserTest, DISABLED_OkButton) {
67 OneClickSigninBubbleView* view = ShowOneClickSigninBubble(); 67 OneClickSigninBubbleView* view = ShowOneClickSigninBubble();
68 68
69 // Simulate pressing the OK button. Set the message loop in the bubble 69 // Simulate pressing the OK button. Set the message loop in the bubble
70 // view so that it can be quit once the bubble is hidden. 70 // view so that it can be quit once the bubble is hidden.
71 views::ButtonListener* listener = view; 71 views::ButtonListener* listener = view;
72 const views::MouseEvent event(ui::ET_MOUSE_PRESSED, 0, 0, 0); 72 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED,
73 gfx::Point(), gfx::Point(),
74 0);
73 listener->ButtonPressed(view->ok_button_, event); 75 listener->ButtonPressed(view->ok_button_, event);
74 76
75 // View should no longer be showing. The message loop will exit once the 77 // View should no longer be showing. The message loop will exit once the
76 // fade animation of the bubble is done. 78 // fade animation of the bubble is done.
77 content::RunMessageLoop(); 79 content::RunMessageLoop();
78 EXPECT_TRUE(on_start_sync_called_); 80 EXPECT_TRUE(on_start_sync_called_);
79 EXPECT_EQ(OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS, mode_); 81 EXPECT_EQ(OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS, mode_);
80 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); 82 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing());
81 } 83 }
82 84
83 // Disabled. See http://crbug.com/132348 85 // Disabled. See http://crbug.com/132348
84 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleViewBrowserTest, 86 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleViewBrowserTest,
85 DISABLED_UndoButton) { 87 DISABLED_UndoButton) {
86 OneClickSigninBubbleView* view = ShowOneClickSigninBubble(); 88 OneClickSigninBubbleView* view = ShowOneClickSigninBubble();
87 89
88 // Simulate pressing the undo button. Set the message loop in the bubble 90 // Simulate pressing the undo button. Set the message loop in the bubble
89 // view so that it can be quit once the bubble is hidden. 91 // view so that it can be quit once the bubble is hidden.
90 views::ButtonListener* listener = view; 92 views::ButtonListener* listener = view;
91 const views::MouseEvent event(ui::ET_MOUSE_PRESSED, 0, 0, 0); 93 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED,
94 gfx::Point(), gfx::Point(),
95 0);
92 listener->ButtonPressed(view->undo_button_, event); 96 listener->ButtonPressed(view->undo_button_, event);
93 97
94 // View should no longer be showing. The message loop will exit once the 98 // View should no longer be showing. The message loop will exit once the
95 // fade animation of the bubble is done. 99 // fade animation of the bubble is done.
96 content::RunMessageLoop(); 100 content::RunMessageLoop();
97 EXPECT_FALSE(on_start_sync_called_); 101 EXPECT_FALSE(on_start_sync_called_);
98 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); 102 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing());
99 } 103 }
100 104
101 // Disabled. See http://crbug.com/132348 105 // Disabled. See http://crbug.com/132348
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 views::View* view = one_click_view; 145 views::View* view = one_click_view;
142 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0); 146 const ui::Accelerator accelerator(ui::VKEY_ESCAPE, 0);
143 view->AcceleratorPressed(accelerator); 147 view->AcceleratorPressed(accelerator);
144 148
145 // View should no longer be showing. The message loop will exit once the 149 // View should no longer be showing. The message loop will exit once the
146 // fade animation of the bubble is done. 150 // fade animation of the bubble is done.
147 content::RunMessageLoop(); 151 content::RunMessageLoop();
148 EXPECT_FALSE(on_start_sync_called_); 152 EXPECT_FALSE(on_start_sync_called_);
149 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing()); 153 EXPECT_FALSE(OneClickSigninBubbleView::IsShowing());
150 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/reload_button_unittest.cc ('k') | chrome/browser/ui/views/tabs/base_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698