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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const GURL& validated_url) { | 42 const GURL& validated_url) { |
43 render_frame_host_ = render_frame_host; | 43 render_frame_host_ = render_frame_host; |
44 if (!wait_for_path_.empty()) { | 44 if (!wait_for_path_.empty()) { |
45 if (validated_url.path() == wait_for_path_) | 45 if (validated_url.path() == wait_for_path_) |
46 message_loop_runner_->Quit(); | 46 message_loop_runner_->Quit(); |
47 } else if (!render_frame_host->GetParent()) { | 47 } else if (!render_frame_host->GetParent()) { |
48 message_loop_runner_->Quit(); | 48 message_loop_runner_->Quit(); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 void NavigationObserver::NavigationEntryCommitted( | 52 void NavigationObserver::DidFinishNavigation( |
53 const content::LoadCommittedDetails& load_details) { | 53 content::NavigationHandle* navigation_handle) { |
54 if (quit_on_entry_committed_) | 54 if (quit_on_entry_committed_) |
55 message_loop_runner_->Quit(); | 55 message_loop_runner_->Quit(); |
56 } | 56 } |
57 | 57 |
58 void NavigationObserver::Wait() { | 58 void NavigationObserver::Wait() { |
59 message_loop_runner_->Run(); | 59 message_loop_runner_->Run(); |
60 } | 60 } |
61 | 61 |
62 PromptObserver::PromptObserver() { | 62 PromptObserver::PromptObserver() { |
63 } | 63 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 " var element = document.getElementById('%s');" | 335 " var element = document.getElementById('%s');" |
336 "window.domAutomationController.send(element && element.value == '%s');", | 336 "window.domAutomationController.send(element && element.value == '%s');", |
337 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(), |
338 element_id.c_str(), expected_value.c_str()); | 338 element_id.c_str(), expected_value.c_str()); |
339 bool return_value = false; | 339 bool return_value = false; |
340 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 340 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
341 RenderViewHost(), value_check_script, &return_value)); | 341 RenderViewHost(), value_check_script, &return_value)); |
342 EXPECT_TRUE(return_value) << "element_id = " << element_id | 342 EXPECT_TRUE(return_value) << "element_id = " << element_id |
343 << ", expected_value = " << expected_value; | 343 << ", expected_value = " << expected_value; |
344 } | 344 } |
OLD | NEW |