| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |