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

Side by Side Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 1200393002: Add more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string
Patch Set: Android Created 5 years, 6 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 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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/chromeos/system/timezone_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698