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

Side by Side Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated doc Created 4 years, 6 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 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 <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // original form since it has more than 2 text input fields and was used for 856 // original form since it has more than 2 text input fields and was used for
857 // the first time on a different form. 857 // the first time on a different form.
858 base::HistogramBase* upload_histogram = 858 base::HistogramBase* upload_histogram =
859 base::StatisticsRecorder::FindHistogram( 859 base::StatisticsRecorder::FindHistogram(
860 "PasswordGeneration.UploadStarted"); 860 "PasswordGeneration.UploadStarted");
861 ASSERT_TRUE(upload_histogram); 861 ASSERT_TRUE(upload_histogram);
862 std::unique_ptr<base::HistogramSamples> snapshot = 862 std::unique_ptr<base::HistogramSamples> snapshot =
863 upload_histogram->SnapshotSamples(); 863 upload_histogram->SnapshotSamples();
864 EXPECT_EQ(0, snapshot->GetCount(0 /* failure */)); 864 EXPECT_EQ(0, snapshot->GetCount(0 /* failure */));
865 EXPECT_EQ(2, snapshot->GetCount(1 /* success */)); 865 EXPECT_EQ(2, snapshot->GetCount(1 /* success */));
866
867 autofill::test::ReenableSystemServices();
866 } 868 }
867 #endif 869 #endif
868 870
869 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 871 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
870 PromptForSubmitFromIframe) { 872 PromptForSubmitFromIframe) {
871 NavigateToFile("/password/password_submit_from_iframe.html"); 873 NavigateToFile("/password/password_submit_from_iframe.html");
872 874
873 // Submit a form in an iframe, then cause the whole page to navigate without a 875 // Submit a form in an iframe, then cause the whole page to navigate without a
874 // user gesture. We expect the save password prompt to be shown here, because 876 // user gesture. We expect the save password prompt to be shown here, because
875 // some pages use such iframes for login forms. 877 // some pages use such iframes for login forms.
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 // about all frames, not just the main one. The factories should receive 3025 // about all frames, not just the main one. The factories should receive
3024 // messages for non-main frames, in particular 3026 // messages for non-main frames, in particular
3025 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the 3027 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the
3026 // factories hear about such frames, this would crash. 3028 // factories hear about such frames, this would crash.
3027 tab_strip_model->AddWebContents(detached_web_contents.release(), -1, 3029 tab_strip_model->AddWebContents(detached_web_contents.release(), -1,
3028 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 3030 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
3029 TabStripModel::ADD_ACTIVE); 3031 TabStripModel::ADD_ACTIVE);
3030 } 3032 }
3031 3033
3032 } // namespace password_manager 3034 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698