OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/login/test/oobe_base_test.h" | 5 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 } | 276 } |
277 | 277 |
278 void OobeBaseTest::SetSignFormField(const std::string& field_id, | 278 void OobeBaseTest::SetSignFormField(const std::string& field_id, |
279 const std::string& field_value) { | 279 const std::string& field_value) { |
280 std::string js = | 280 std::string js = |
281 "(function(){" | 281 "(function(){" |
282 "document.getElementById('$FieldId').value = '$FieldValue';" | 282 "document.getElementById('$FieldId').value = '$FieldValue';" |
283 "var e = new Event('input');" | 283 "var e = new Event('input');" |
284 "document.getElementById('$FieldId').dispatchEvent(e);" | 284 "document.getElementById('$FieldId').dispatchEvent(e);" |
285 "})();"; | 285 "})();"; |
286 ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id); | 286 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id); |
287 ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value); | 287 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value); |
288 ExecuteJsInSigninFrame(js); | 288 ExecuteJsInSigninFrame(js); |
289 } | 289 } |
290 | 290 |
291 } // namespace chromeos | 291 } // namespace chromeos |
OLD | NEW |