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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_test.cc

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_Activate
Patch Set: Update callers Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/scoped_tabbed_browser_displayer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/passwords/manage_passwords_test.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 15 matching lines...) Expand all
26 26
27 ManagePasswordsTest::~ManagePasswordsTest() { 27 ManagePasswordsTest::~ManagePasswordsTest() {
28 } 28 }
29 29
30 void ManagePasswordsTest::SetUpOnMainThread() { 30 void ManagePasswordsTest::SetUpOnMainThread() {
31 AddTabAtIndex(0, GURL("http://example.com/"), ui::PAGE_TRANSITION_TYPED); 31 AddTabAtIndex(0, GURL("http://example.com/"), ui::PAGE_TRANSITION_TYPED);
32 } 32 }
33 33
34 void ManagePasswordsTest::ExecuteManagePasswordsCommand() { 34 void ManagePasswordsTest::ExecuteManagePasswordsCommand() {
35 // Show the window to ensure that it's active. 35 // Show the window to ensure that it's active.
36 browser()->window()->Show(); 36 browser()->window()->Show(false /* user_gesture */);
37 37
38 CommandUpdater* updater = browser()->command_controller()->command_updater(); 38 CommandUpdater* updater = browser()->command_controller()->command_updater();
39 EXPECT_TRUE(updater->IsCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE)); 39 EXPECT_TRUE(updater->IsCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE));
40 EXPECT_TRUE(updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE)); 40 EXPECT_TRUE(updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE));
41 41
42 // Wait for the command execution to pop up the bubble. 42 // Wait for the command execution to pop up the bubble.
43 content::RunAllPendingInMessageLoop(); 43 content::RunAllPendingInMessageLoop();
44 } 44 }
45 45
46 void ManagePasswordsTest::SetupManagingPasswords() { 46 void ManagePasswordsTest::SetupManagingPasswords() {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Ensure that everything has been properly recorded before pulling samples. 98 // Ensure that everything has been properly recorded before pulling samples.
99 content::RunAllPendingInMessageLoop(); 99 content::RunAllPendingInMessageLoop();
100 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram) 100 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram)
101 .release(); 101 .release();
102 } 102 }
103 103
104 ManagePasswordsUIController* ManagePasswordsTest::GetController() { 104 ManagePasswordsUIController* ManagePasswordsTest::GetController() {
105 return ManagePasswordsUIController::FromWebContents( 105 return ManagePasswordsUIController::FromWebContents(
106 browser()->tab_strip_model()->GetActiveWebContents()); 106 browser()->tab_strip_model()->GetActiveWebContents());
107 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/scoped_tabbed_browser_displayer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698