| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/password_manager/password_manager_test_base.h" | 5 #include "chrome/browser/password_manager/password_manager_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | |
| 10 #include "base/macros.h" | 9 #include "base/macros.h" |
| 11 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 12 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 13 #include "chrome/browser/infobars/infobar_service.h" | 12 #include "chrome/browser/infobars/infobar_service.h" |
| 14 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 13 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 15 #include "chrome/browser/password_manager/password_store_factory.h" | 14 #include "chrome/browser/password_manager/password_store_factory.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" | 17 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
| 21 #include "components/autofill/core/browser/autofill_test_utils.h" | 20 #include "components/autofill/core/browser/autofill_test_utils.h" |
| 22 #include "components/infobars/core/confirm_infobar_delegate.h" | 21 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 23 #include "components/infobars/core/infobar.h" | 22 #include "components/infobars/core/infobar.h" |
| 24 #include "components/infobars/core/infobar_manager.h" | 23 #include "components/infobars/core/infobar_manager.h" |
| 25 #include "components/password_manager/core/browser/password_manager_test_utils.h
" | 24 #include "components/password_manager/core/browser/password_manager_test_utils.h
" |
| 26 #include "components/password_manager/core/browser/test_password_store.h" | 25 #include "components/password_manager/core/browser/test_password_store.h" |
| 27 #include "components/password_manager/core/common/password_manager_features.h" | 26 #include "components/password_manager/core/common/password_manager_features.h" |
| 28 #include "components/password_manager/core/common/password_manager_switches.h" | |
| 29 #include "content/public/browser/render_frame_host.h" | 27 #include "content/public/browser/render_frame_host.h" |
| 30 #include "content/public/test/browser_test_utils.h" | 28 #include "content/public/test/browser_test_utils.h" |
| 31 #include "content/public/test/test_utils.h" | 29 #include "content/public/test/test_utils.h" |
| 32 #include "net/test/embedded_test_server/embedded_test_server.h" | 30 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 33 | 31 |
| 34 NavigationObserver::NavigationObserver(content::WebContents* web_contents) | 32 NavigationObserver::NavigationObserver(content::WebContents* web_contents) |
| 35 : content::WebContentsObserver(web_contents), | 33 : content::WebContentsObserver(web_contents), |
| 36 quit_on_entry_committed_(false), | 34 quit_on_entry_committed_(false), |
| 37 message_loop_runner_(new content::MessageLoopRunner) { | 35 message_loop_runner_(new content::MessageLoopRunner) { |
| 38 } | 36 } |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 " var element = document.getElementById('%s');" | 335 " var element = document.getElementById('%s');" |
| 338 "window.domAutomationController.send(element && element.value == '%s');", | 336 "window.domAutomationController.send(element && element.value == '%s');", |
| 339 iframe_id.c_str(), iframe_id.c_str(), element_id.c_str(), | 337 iframe_id.c_str(), iframe_id.c_str(), element_id.c_str(), |
| 340 element_id.c_str(), expected_value.c_str()); | 338 element_id.c_str(), expected_value.c_str()); |
| 341 bool return_value = false; | 339 bool return_value = false; |
| 342 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 340 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
| 343 RenderViewHost(), value_check_script, &return_value)); | 341 RenderViewHost(), value_check_script, &return_value)); |
| 344 EXPECT_TRUE(return_value) << "element_id = " << element_id | 342 EXPECT_TRUE(return_value) << "element_id = " << element_id |
| 345 << ", expected_value = " << expected_value; | 343 << ", expected_value = " << expected_value; |
| 346 } | 344 } |
| OLD | NEW |