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

Side by Side Diff: content/shell/renderer/webkit_test_runner.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « content/shell/browser/shell_content_browser_client.cc ('k') | crypto/symmetric_key_unittest.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 "content/shell/renderer/webkit_test_runner.h" 5 #include "content/shell/renderer/webkit_test_runner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 if (resource.find("/tmp/") == 0) { 474 if (resource.find("/tmp/") == 0) {
475 // We want a temp file. 475 // We want a temp file.
476 GURL base_url = net::FilePathToFileURL(test_config_.temp_path); 476 GURL base_url = net::FilePathToFileURL(test_config_.temp_path);
477 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec(); 477 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec();
478 } 478 }
479 #endif 479 #endif
480 480
481 // Some layout tests use file://// which we resolve as a UNC path. Normalize 481 // Some layout tests use file://// which we resolve as a UNC path. Normalize
482 // them to just file:///. 482 // them to just file:///.
483 std::string result = resource; 483 std::string result = resource;
484 while (StringToLowerASCII(result).find("file:////") == 0) { 484 while (base::StringToLowerASCII(result).find("file:////") == 0) {
485 result = result.substr(0, strlen("file:///")) + 485 result = result.substr(0, strlen("file:///")) +
486 result.substr(strlen("file:////")); 486 result.substr(strlen("file:////"));
487 } 487 }
488 return rewriteLayoutTestsURL(result).spec(); 488 return rewriteLayoutTestsURL(result).spec();
489 } 489 }
490 490
491 void WebKitTestRunner::setLocale(const std::string& locale) { 491 void WebKitTestRunner::setLocale(const std::string& locale) {
492 setlocale(LC_ALL, locale.c_str()); 492 setlocale(LC_ALL, locale.c_str());
493 } 493 }
494 494
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 742
743 leak_detector_->TryLeakDetection(main_frame); 743 leak_detector_->TryLeakDetection(main_frame);
744 } 744 }
745 745
746 void WebKitTestRunner::ReportLeakDetectionResult( 746 void WebKitTestRunner::ReportLeakDetectionResult(
747 const LeakDetectionResult& report) { 747 const LeakDetectionResult& report) {
748 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 748 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
749 } 749 }
750 750
751 } // namespace content 751 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | crypto/symmetric_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698