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

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

Issue 241193002: Password autofill: Check for user gesture switches to new Blink backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE removed test enabled Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/autofill/content/renderer/autofill_agent.h » ('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 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_samples.h" 8 #include "base/metrics/histogram_samples.h"
9 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 "document.getElementById('password_field').value = 'random';" 586 "document.getElementById('password_field').value = 'random';"
587 "document.getElementById('input_submit_button').click();" 587 "document.getElementById('input_submit_button').click();"
588 "window.location.href = 'done.html';"; 588 "window.location.href = 'done.html';";
589 589
590 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), save_and_remove)); 590 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), save_and_remove));
591 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), navigate_frame)); 591 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), navigate_frame));
592 observer.Wait(); 592 observer.Wait();
593 // The only thing we check here is that there is no use-after-free reported. 593 // The only thing we check here is that there is no use-after-free reported.
594 } 594 }
595 595
596 // Disabled on Windows due to flakiness: http://crbug.com/163072 596 // Disabled on Windows due to flakiness: http://crbug.com/346297
597 // TODO(vabr): Also disabled on Android, because the tested feature is currently 597 #if defined(OS_WIN)
598 // disabled there. http://crbug.com/345510#c13
599 #if defined(OS_WIN) || defined(OS_ANDROID)
600 #define MAYBE_PasswordValueAccessible DISABLED_PasswordValueAccessible 598 #define MAYBE_PasswordValueAccessible DISABLED_PasswordValueAccessible
601 #else 599 #else
602 #define MAYBE_PasswordValueAccessible PasswordValueAccessible 600 #define MAYBE_PasswordValueAccessible PasswordValueAccessible
603 #endif 601 #endif
604 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, 602 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest,
605 MAYBE_PasswordValueAccessible) { 603 MAYBE_PasswordValueAccessible) {
vabr (Chromium) 2014/04/18 18:23:53 Thanks for reminding me of the test, I needed to e
606 NavigateToFile("/password/form_and_link.html"); 604 NavigateToFile("/password/form_and_link.html");
607 605
608 // Click on a link to open a new tab, then switch back to the first one. 606 // Click on a link to open a new tab, then switch back to the first one.
609 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 607 EXPECT_EQ(1, browser()->tab_strip_model()->count());
610 std::string click = 608 std::string click =
611 "document.getElementById('testlink').click();"; 609 "document.getElementById('testlink').click();";
612 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), click)); 610 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), click));
613 EXPECT_EQ(2, browser()->tab_strip_model()->count()); 611 EXPECT_EQ(2, browser()->tab_strip_model()->count());
614 browser()->tab_strip_model()->ActivateTabAt(0, false); 612 browser()->tab_strip_model()->ActivateTabAt(0, false);
615 613
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 DontPromptForPasswordFormWithDefaultValue) { 645 DontPromptForPasswordFormWithDefaultValue) {
648 NavigateToFile("/password/password_form_with_default_value.html"); 646 NavigateToFile("/password/password_form_with_default_value.html");
649 647
650 // Don't prompt if we navigate away even if there is a password value since 648 // Don't prompt if we navigate away even if there is a password value since
651 // it's not coming from the user. 649 // it's not coming from the user.
652 NavigationObserver observer(WebContents()); 650 NavigationObserver observer(WebContents());
653 NavigateToFile("/password/done.html"); 651 NavigateToFile("/password/done.html");
654 observer.Wait(); 652 observer.Wait();
655 EXPECT_FALSE(observer.infobar_shown()); 653 EXPECT_FALSE(observer.infobar_shown());
656 } 654 }
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698