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

Side by Side Diff: webkit/tools/test_shell/test_shell_win.cc

Issue 8983009: Remove more wstrings in webkit/tools/test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/test_shell.h" 5 #include "webkit/tools/test_shell/test_shell.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #include <objbase.h> 9 #include <objbase.h>
10 #include <process.h> 10 #include <process.h>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void* font_ptr; 171 void* font_ptr;
172 size_t font_size; 172 size_t font_size;
173 if (base::win::GetDataResourceFromModule(::GetModuleHandle(NULL), 173 if (base::win::GetDataResourceFromModule(::GetModuleHandle(NULL),
174 IDR_AHEM_FONT, &font_ptr, &font_size)) { 174 IDR_AHEM_FONT, &font_ptr, &font_size)) {
175 HANDLE rc = AddFontMemResourceEx(font_ptr, font_size, 0, &num_fonts); 175 HANDLE rc = AddFontMemResourceEx(font_ptr, font_size, 0, &num_fonts);
176 DCHECK(rc != 0); 176 DCHECK(rc != 0);
177 } 177 }
178 178
179 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 179 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
180 if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) { 180 if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) {
181 std::wstring dir( 181 string16 dir(
182 parsed_command_line.GetSwitchValueNative(test_shell::kCrashDumps)); 182 parsed_command_line.GetSwitchValueNative(test_shell::kCrashDumps));
183 if (parsed_command_line.HasSwitch(test_shell::kCrashDumpsFulldump)) { 183 if (parsed_command_line.HasSwitch(test_shell::kCrashDumpsFulldump)) {
184 new google_breakpad::ExceptionHandler( 184 new google_breakpad::ExceptionHandler(
185 dir, 0, &MinidumpCallback, 0, true, 185 dir, 0, &MinidumpCallback, 0, true,
186 kFullDumpType, 0, 0); 186 kFullDumpType, 0, 0);
187 } else { 187 } else {
188 new google_breakpad::ExceptionHandler( 188 new google_breakpad::ExceptionHandler(
189 dir, 0, &MinidumpCallback, 0, true); 189 dir, 0, &MinidumpCallback, 0, true);
190 } 190 }
191 } 191 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 std::string new_url(url); 241 std::string new_url(url);
242 if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) { 242 if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) {
243 FilePath replace_url; 243 FilePath replace_url;
244 PathService::Get(base::DIR_EXE, &replace_url); 244 PathService::Get(base::DIR_EXE, &replace_url);
245 replace_url = replace_url.DirName(); 245 replace_url = replace_url.DirName();
246 replace_url = replace_url.DirName(); 246 replace_url = replace_url.DirName();
247 replace_url = replace_url.AppendASCII("third_party"); 247 replace_url = replace_url.AppendASCII("third_party");
248 replace_url = replace_url.AppendASCII("WebKit"); 248 replace_url = replace_url.AppendASCII("WebKit");
249 replace_url = replace_url.AppendASCII("LayoutTests"); 249 replace_url = replace_url.AppendASCII("LayoutTests");
250 std::wstring replace_url_str = replace_url.value(); 250 string16 replace_url_str = replace_url.value();
251 replace_url_str.push_back(L'/'); 251 replace_url_str.push_back(L'/');
252 new_url = std::string("file:///") + 252 new_url = std::string("file:///") +
253 WideToUTF8(replace_url_str).append(url.substr(kPrefixLen)); 253 UTF16ToUTF8(replace_url_str).append(url.substr(kPrefixLen));
254 } 254 }
255 return new_url; 255 return new_url;
256 } 256 }
257 257
258 258
259 259
260 ///////////////////////////////////////////////////////////////////////////// 260 /////////////////////////////////////////////////////////////////////////////
261 // TestShell implementation 261 // TestShell implementation
262 262
263 void TestShell::PlatformCleanUp() { 263 void TestShell::PlatformCleanUp() {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 bool EnsureFontLoaded(HFONT font) { 731 bool EnsureFontLoaded(HFONT font) {
732 return true; 732 return true;
733 } 733 }
734 734
735 bool DownloadUrl(const std::string& url, HWND caller_window) { 735 bool DownloadUrl(const std::string& url, HWND caller_window) {
736 return false; 736 return false;
737 } 737 }
738 738
739 } // namespace webkit_glue 739 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/test_webview_delegate.mm ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698