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

Side by Side Diff: chrome/test/reliability/automated_ui_tests.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <fstream> 5 #include <fstream>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 499
500 return did_complete_action; 500 return did_complete_action;
501 } 501 }
502 502
503 bool AutomatedUITest::ChangeEncoding() { 503 bool AutomatedUITest::ChangeEncoding() {
504 // Get the encoding list that is used to populate the UI (encoding menu) 504 // Get the encoding list that is used to populate the UI (encoding menu)
505 std::string cur_locale = g_browser_process->GetApplicationLocale(); 505 std::string cur_locale = g_browser_process->GetApplicationLocale();
506 const std::vector<CharacterEncoding::EncodingInfo>* encodings = 506 const std::vector<CharacterEncoding::EncodingInfo>* encodings =
507 CharacterEncoding::GetCurrentDisplayEncodings( 507 CharacterEncoding::GetCurrentDisplayEncodings(
508 cur_locale, "ISO-8859-1,windows-1252", ""); 508 cur_locale, "ISO-8859-1,windows-1252", std::string());
509 DCHECK(encodings); 509 DCHECK(encodings);
510 DCHECK(!encodings->empty()); 510 DCHECK(!encodings->empty());
511 unsigned len = static_cast<unsigned>(encodings->size()); 511 unsigned len = static_cast<unsigned>(encodings->size());
512 512
513 // The vector will contain mostly IDC values for encoding commands plus a few 513 // The vector will contain mostly IDC values for encoding commands plus a few
514 // menu separators (0 values). If we hit a separator we just retry. 514 // menu separators (0 values). If we hit a separator we just retry.
515 int index = base::RandInt(0, len); 515 int index = base::RandInt(0, len);
516 while ((*encodings)[index].encoding_id == 0) { 516 while ((*encodings)[index].encoding_id == 0) {
517 index = base::RandInt(0, len); 517 index = base::RandInt(0, len);
518 } 518 }
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 } 809 }
810 } 810 }
811 811
812 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 812 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
813 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 813 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
814 if (parsed_command_line.HasSwitch(kReproSwitch)) 814 if (parsed_command_line.HasSwitch(kReproSwitch))
815 RunReproduction(); 815 RunReproduction();
816 else 816 else
817 RunAutomatedUITest(); 817 RunAutomatedUITest();
818 } 818 }
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698