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

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

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 years, 3 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/test/automation/automation_messages_internal.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/file_util.h" 10 #include "base/file_util.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 PlatformThread::Sleep(1000 * post_action_delay_); 432 PlatformThread::Sleep(1000 * post_action_delay_);
433 433
434 return did_complete_action; 434 return did_complete_action;
435 } 435 }
436 436
437 bool AutomatedUITest::ChangeEncoding() { 437 bool AutomatedUITest::ChangeEncoding() {
438 // Get the encoding list that is used to populate the UI (encoding menu) 438 // Get the encoding list that is used to populate the UI (encoding menu)
439 std::string cur_locale = g_browser_process->GetApplicationLocale(); 439 std::string cur_locale = g_browser_process->GetApplicationLocale();
440 const std::vector<CharacterEncoding::EncodingInfo>* encodings = 440 const std::vector<CharacterEncoding::EncodingInfo>* encodings =
441 CharacterEncoding::GetCurrentDisplayEncodings( 441 CharacterEncoding::GetCurrentDisplayEncodings(
442 cur_locale, L"ISO-8859-1,windows-1252", L""); 442 cur_locale, "ISO-8859-1,windows-1252", "");
443 DCHECK(encodings); 443 DCHECK(encodings);
444 DCHECK(!encodings->empty()); 444 DCHECK(!encodings->empty());
445 unsigned len = static_cast<unsigned>(encodings->size()); 445 unsigned len = static_cast<unsigned>(encodings->size());
446 446
447 // The vector will contain mostly IDC values for encoding commands plus a few 447 // The vector will contain mostly IDC values for encoding commands plus a few
448 // menu separators (0 values). If we hit a separator we just retry. 448 // menu separators (0 values). If we hit a separator we just retry.
449 int index = base::RandInt(0, len); 449 int index = base::RandInt(0, len);
450 while ((*encodings)[index].encoding_id == 0) { 450 while ((*encodings)[index].encoding_id == 0) {
451 index = base::RandInt(0, len); 451 index = base::RandInt(0, len);
452 } 452 }
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 } 778 }
779 } 779 }
780 780
781 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 781 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
782 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 782 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
783 if (parsed_command_line.HasSwitch(kReproSwitch)) 783 if (parsed_command_line.HasSwitch(kReproSwitch))
784 RunReproduction(); 784 RunReproduction();
785 else 785 else
786 RunAutomatedUITest(); 786 RunAutomatedUITest();
787 } 787 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/test/automation/automation_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698