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

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

Issue 2776513002: Enable PasswordManagerBrowserTestBase.SameOriginIframeAutoFillTest to get more data (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | chrome/browser/password_manager/password_manager_test_base.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 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 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 // Verify password is not autofilled 2076 // Verify password is not autofilled
2077 ASSERT_TRUE(content::ExecuteScriptAndExtractString( 2077 ASSERT_TRUE(content::ExecuteScriptAndExtractString(
2078 RenderViewHost(), 2078 RenderViewHost(),
2079 "sendMessage('get_password');", 2079 "sendMessage('get_password');",
2080 &empty_password)); 2080 &empty_password));
2081 ASSERT_EQ("", empty_password); 2081 ASSERT_EQ("", empty_password);
2082 } 2082 }
2083 2083
2084 // Check that a password form in an iframe of same origin will not be 2084 // Check that a password form in an iframe of same origin will not be
2085 // filled in until user interact with the iframe. 2085 // filled in until user interact with the iframe.
2086 // TODO(crbug.com/683209): Flaky on Win7 dbg.
2087 #if defined(OS_WIN)
2088 #define MAYBE_SameOriginIframeAutoFillTest DISABLED_SameOriginIframeAutoFillTest
2089 #else
2090 #define MAYBE_SameOriginIframeAutoFillTest SameOriginIframeAutoFillTest
2091 #endif
2092 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2086 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2093 MAYBE_SameOriginIframeAutoFillTest) { 2087 SameOriginIframeAutoFillTest) {
2094 // Visit the sign-up form to store a password for autofill later 2088 // Visit the sign-up form to store a password for autofill later
2095 NavigateToFile("/password/password_form_in_same_origin_iframe.html"); 2089 NavigateToFile("/password/password_form_in_same_origin_iframe.html");
2096 NavigationObserver observer(WebContents()); 2090 NavigationObserver observer(WebContents());
2097 observer.SetPathToWaitFor("/password/done.html"); 2091 observer.SetPathToWaitFor("/password/done.html");
2098 std::unique_ptr<BubbleObserver> prompt_observer( 2092 std::unique_ptr<BubbleObserver> prompt_observer(
2099 new BubbleObserver(WebContents())); 2093 new BubbleObserver(WebContents()));
2100 2094
2101 std::string submit = 2095 std::string submit =
2102 "var ifrmDoc = document.getElementById('iframe').contentDocument;" 2096 "var ifrmDoc = document.getElementById('iframe').contentDocument;"
2103 "ifrmDoc.getElementById('username_field').value = 'temp';" 2097 "ifrmDoc.getElementById('username_field').value = 'temp';"
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 gfx::Point(left + 1, top + 1)); 3327 gfx::Point(left + 1, top + 1));
3334 // Force a round-trip. 3328 // Force a round-trip.
3335 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), "var noop = 'noop';")); 3329 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), "var noop = 'noop';"));
3336 // Ensure the warning was not triggered. 3330 // Ensure the warning was not triggered.
3337 ASSERT_FALSE(observing_autofill_client->DidPopupAppear()); 3331 ASSERT_FALSE(observing_autofill_client->DidPopupAppear());
3338 // Ensure the histogram remains empty. 3332 // Ensure the histogram remains empty.
3339 histograms.ExpectTotalCount(kHistogram, 0); 3333 histograms.ExpectTotalCount(kHistogram, 0);
3340 } 3334 }
3341 3335
3342 } // namespace password_manager 3336 } // namespace password_manager
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698