| OLD | NEW |
| 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 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 "window.domAutomationController.send(" | 2737 "window.domAutomationController.send(" |
| 2738 " document.getElementById('hidden_password_form').elements[2].value);"; | 2738 " document.getElementById('hidden_password_form').elements[2].value);"; |
| 2739 std::string actual_password; | 2739 std::string actual_password; |
| 2740 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 2740 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 2741 RenderViewHost(), get_password, &actual_password)); | 2741 RenderViewHost(), get_password, &actual_password)); |
| 2742 EXPECT_EQ("mypassword", actual_password); | 2742 EXPECT_EQ("mypassword", actual_password); |
| 2743 } | 2743 } |
| 2744 | 2744 |
| 2745 // Check that the internals page contains logs both from the renderer and the | 2745 // Check that the internals page contains logs both from the renderer and the |
| 2746 // browser. | 2746 // browser. |
| 2747 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, InternalsPage) { | 2747 // TODO(crbug.com/640737) Flaky on Mac. |
| 2748 #if defined(OS_MACOSX) |
| 2749 #define MAYBE_InternalsPage DISABLED_InternalsPage |
| 2750 #else |
| 2751 #define MAYBE_InternalsPage InternalsPage |
| 2752 #endif |
| 2753 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, MAYBE_InternalsPage) { |
| 2748 ui_test_utils::NavigateToURLWithDisposition( | 2754 ui_test_utils::NavigateToURLWithDisposition( |
| 2749 browser(), GURL("chrome://password-manager-internals"), CURRENT_TAB, | 2755 browser(), GURL("chrome://password-manager-internals"), CURRENT_TAB, |
| 2750 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 2756 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 2751 content::WebContents* internals_web_contents = WebContents(); | 2757 content::WebContents* internals_web_contents = WebContents(); |
| 2752 | 2758 |
| 2753 ui_test_utils::NavigateToURLWithDisposition( | 2759 ui_test_utils::NavigateToURLWithDisposition( |
| 2754 browser(), embedded_test_server()->GetURL("/password/password_form.html"), | 2760 browser(), embedded_test_server()->GetURL("/password/password_form.html"), |
| 2755 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 2761 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 2756 | 2762 |
| 2757 std::string find_renderer_logs = | 2763 std::string find_renderer_logs = |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3046 // about all frames, not just the main one. The factories should receive | 3052 // about all frames, not just the main one. The factories should receive |
| 3047 // messages for non-main frames, in particular | 3053 // messages for non-main frames, in particular |
| 3048 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the | 3054 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the |
| 3049 // factories hear about such frames, this would crash. | 3055 // factories hear about such frames, this would crash. |
| 3050 tab_strip_model->AddWebContents(detached_web_contents.release(), -1, | 3056 tab_strip_model->AddWebContents(detached_web_contents.release(), -1, |
| 3051 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 3057 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 3052 TabStripModel::ADD_ACTIVE); | 3058 TabStripModel::ADD_ACTIVE); |
| 3053 } | 3059 } |
| 3054 | 3060 |
| 3055 } // namespace password_manager | 3061 } // namespace password_manager |
| OLD | NEW |