OLD | NEW |
---|---|
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/views/passwords/manage_passwords_view_test.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_view_test.h" |
6 | 6 |
7 #include "base/test/statistics_delta_reader.h" | 7 #include "base/test/histogram_tester.h" |
msw
2014/07/18 17:30:25
nit: you don't need to explicitly include this her
Mike Lerman
2014/07/18 18:23:58
Done.
| |
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/passwords/manage_passwords_icon.h" | 11 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
12 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 12 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
14 #include "chrome/browser/ui/views/frame/browser_view.h" | 14 #include "chrome/browser/ui/views/frame/browser_view.h" |
15 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 15 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
16 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h" | 16 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h" |
17 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 17 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 autofill::PasswordFormMap map; | 83 autofill::PasswordFormMap map; |
84 map[kTestUsername] = test_form(); | 84 map[kTestUsername] = test_form(); |
85 controller()->OnBlacklistBlockedAutofill(map); | 85 controller()->OnBlacklistBlockedAutofill(map); |
86 controller()->UpdateIconAndBubbleState(view()); | 86 controller()->UpdateIconAndBubbleState(view()); |
87 } | 87 } |
88 | 88 |
89 base::HistogramSamples* ManagePasswordsViewTest::GetSamples( | 89 base::HistogramSamples* ManagePasswordsViewTest::GetSamples( |
90 const char* histogram) { | 90 const char* histogram) { |
91 // Ensure that everything has been properly recorded before pulling samples. | 91 // Ensure that everything has been properly recorded before pulling samples. |
92 content::RunAllPendingInMessageLoop(); | 92 content::RunAllPendingInMessageLoop(); |
93 return statistics_reader_.GetHistogramSamplesSinceCreation( | 93 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram) |
msw
2014/07/18 17:30:25
nit: or make this function-local, not a class memb
Mike Lerman
2014/07/18 18:23:58
The timing of the execution of the constructor is
| |
94 histogram).release(); | 94 .release(); |
95 } | 95 } |
OLD | NEW |