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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
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/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_command_controller.h" 10 #include "chrome/browser/ui/browser_command_controller.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" 12 #include "chrome/browser/ui/passwords/manage_passwords_icon.h"
13 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" 13 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
16 #include "chrome/test/base/interactive_test_utils.h" 16 #include "chrome/test/base/interactive_test_utils.h"
17 #include "components/autofill/core/common/password_form.h" 17 #include "components/autofill/core/common/password_form.h"
18 #include "components/password_manager/core/browser/password_form_manager.h" 18 #include "components/password_manager/core/browser/password_form_manager.h"
19 #include "components/password_manager/core/browser/password_manager_metrics_util .h" 19 #include "components/password_manager/core/browser/password_manager_metrics_util .h"
20 #include "components/password_manager/core/browser/stub_password_manager_client. h" 20 #include "components/password_manager/core/browser/stub_password_manager_client. h"
21 #include "components/password_manager/core/browser/stub_password_manager_driver. h" 21 #include "components/password_manager/core/browser/stub_password_manager_driver. h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 void ManagePasswordsTest::SetUpOnMainThread() { 24 void ManagePasswordsTest::SetUpOnMainThread() {
25 AddTabAtIndex(0, GURL("http://example.com/"), content::PAGE_TRANSITION_TYPED); 25 AddTabAtIndex(0, GURL("http://example.com/"), ui::PAGE_TRANSITION_TYPED);
26 // Create the test UIController here so that it's bound to the currently 26 // Create the test UIController here so that it's bound to the currently
27 // active WebContents. 27 // active WebContents.
28 new ManagePasswordsUIControllerMock( 28 new ManagePasswordsUIControllerMock(
29 browser()->tab_strip_model()->GetActiveWebContents()); 29 browser()->tab_strip_model()->GetActiveWebContents());
30 } 30 }
31 31
32 ManagePasswordsUIControllerMock* ManagePasswordsTest::controller() { 32 ManagePasswordsUIControllerMock* ManagePasswordsTest::controller() {
33 return static_cast<ManagePasswordsUIControllerMock*>( 33 return static_cast<ManagePasswordsUIControllerMock*>(
34 ManagePasswordsUIController::FromWebContents( 34 ManagePasswordsUIController::FromWebContents(
35 browser()->tab_strip_model()->GetActiveWebContents())); 35 browser()->tab_strip_model()->GetActiveWebContents()));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 controller()->UpdateIconAndBubbleState(view()); 91 controller()->UpdateIconAndBubbleState(view());
92 } 92 }
93 93
94 base::HistogramSamples* ManagePasswordsTest::GetSamples( 94 base::HistogramSamples* ManagePasswordsTest::GetSamples(
95 const char* histogram) { 95 const char* histogram) {
96 // Ensure that everything has been properly recorded before pulling samples. 96 // Ensure that everything has been properly recorded before pulling samples.
97 content::RunAllPendingInMessageLoop(); 97 content::RunAllPendingInMessageLoop();
98 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram) 98 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram)
99 .release(); 99 .release();
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_host.cc ('k') | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698