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

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

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // the password. 157 // the password.
158 base::RunLoop run_loop; 158 base::RunLoop run_loop;
159 run_loop.RunUntilIdle(); 159 run_loop.RunUntilIdle();
160 ASSERT_FALSE(password_store->IsEmpty()); 160 ASSERT_FALSE(password_store->IsEmpty());
161 161
162 NavigateToFile(filename); 162 NavigateToFile(filename);
163 163
164 // Let the user interact with the page, so that DOM gets modification events, 164 // Let the user interact with the page, so that DOM gets modification events,
165 // needed for autofilling fields. 165 // needed for autofilling fields.
166 content::SimulateMouseClickAt( 166 content::SimulateMouseClickAt(
167 WebContents(), 0, blink::WebMouseEvent::ButtonLeft, gfx::Point(1, 1)); 167 WebContents(), 0, blink::WebMouseEvent::Button::Left, gfx::Point(1, 1));
168 168
169 // Wait until that interaction causes the password value to be revealed. 169 // Wait until that interaction causes the password value to be revealed.
170 WaitForElementValue(expected_element, expected_value); 170 WaitForElementValue(expected_element, expected_value);
171 } 171 }
172 172
173 void PasswordManagerBrowserTestBase::WaitForElementValue( 173 void PasswordManagerBrowserTestBase::WaitForElementValue(
174 const std::string& element_id, 174 const std::string& element_id,
175 const std::string& expected_value) { 175 const std::string& expected_value) {
176 WaitForElementValue("null", element_id, expected_value); 176 WaitForElementValue("null", element_id, expected_value);
177 } 177 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 " var element = document.getElementById('%s');" 249 " var element = document.getElementById('%s');"
250 "window.domAutomationController.send(element && element.value == '%s');", 250 "window.domAutomationController.send(element && element.value == '%s');",
251 iframe_id.c_str(), iframe_id.c_str(), element_id.c_str(), 251 iframe_id.c_str(), iframe_id.c_str(), element_id.c_str(),
252 element_id.c_str(), expected_value.c_str()); 252 element_id.c_str(), expected_value.c_str());
253 bool return_value = false; 253 bool return_value = false;
254 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 254 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
255 RenderViewHost(), value_check_script, &return_value)); 255 RenderViewHost(), value_check_script, &return_value));
256 EXPECT_TRUE(return_value) << "element_id = " << element_id 256 EXPECT_TRUE(return_value) << "element_id = " << element_id
257 << ", expected_value = " << expected_value; 257 << ", expected_value = " << expected_value;
258 } 258 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_interactive_uitest.cc ('k') | chrome/browser/pdf/pdf_extension_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698