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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (resource.find("/tmp/") == 0) { 527 if (resource.find("/tmp/") == 0) {
528 // We want a temp file. 528 // We want a temp file.
529 GURL base_url = net::FilePathToFileURL(test_config_.temp_path); 529 GURL base_url = net::FilePathToFileURL(test_config_.temp_path);
530 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec(); 530 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec();
531 } 531 }
532 #endif 532 #endif
533 533
534 // Some layout tests use file://// which we resolve as a UNC path. Normalize 534 // Some layout tests use file://// which we resolve as a UNC path. Normalize
535 // them to just file:///. 535 // them to just file:///.
536 std::string result = resource; 536 std::string result = resource;
537 while (base::StringToLowerASCII(result).find("file:////") == 0) { 537 while (base::ToLowerASCII(result).find("file:////") == 0) {
538 result = result.substr(0, strlen("file:///")) + 538 result = result.substr(0, strlen("file:///")) +
539 result.substr(strlen("file:////")); 539 result.substr(strlen("file:////"));
540 } 540 }
541 return RewriteLayoutTestsURL(result).spec(); 541 return RewriteLayoutTestsURL(result).spec();
542 } 542 }
543 543
544 void BlinkTestRunner::SetLocale(const std::string& locale) { 544 void BlinkTestRunner::SetLocale(const std::string& locale) {
545 setlocale(LC_ALL, locale.c_str()); 545 setlocale(LC_ALL, locale.c_str());
546 } 546 }
547 547
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 900
901 leak_detector_->TryLeakDetection(main_frame); 901 leak_detector_->TryLeakDetection(main_frame);
902 } 902 }
903 903
904 void BlinkTestRunner::ReportLeakDetectionResult( 904 void BlinkTestRunner::ReportLeakDetectionResult(
905 const LeakDetectionResult& report) { 905 const LeakDetectionResult& report) {
906 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 906 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
907 } 907 }
908 908
909 } // namespace content 909 } // 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