Changeset 64451 in webkit
- Timestamp:
- Aug 1, 2010 7:03:18 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r64445 r64451 1 2010-08-01 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 [DRT/Chromium] Remove string_util.h dependency 6 https://bugs.webkit.org/show_bug.cgi?id=43312 7 8 * DumpRenderTree/chromium/LayoutTestController.cpp: 9 (LayoutTestController::pathToLocalResource): 10 Use string::find() instead of StartsWithASCII(). 11 (LayoutTestController::cppVariantToInt32): 12 Use strtol() instead of StringToNumber(). 13 1 14 2010-08-01 Sam Weinig <sam@webkit.org> 2 15 -
trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
r64356 r64451 36 36 #include "TestShell.h" 37 37 #include "WebViewHost.h" 38 #include "base/string_util.h"39 38 #include "public/WebAnimationController.h" 40 39 #include "public/WebConsoleMessage.h" … … 52 51 #include "public/WebView.h" 53 52 #include "webkit/support/webkit_support.h" 53 #include <algorithm> 54 #include <cstdlib> 55 #include <limits> 54 56 #include <wtf/text/WTFString.h> 55 57 … … 705 707 string url = arguments[0].toString(); 706 708 #if OS(WINDOWS) 707 if ( StartsWithASCII(url, "/tmp/", true)) {709 if (!url.find("/tmp/")) { 708 710 // We want a temp file. 709 711 const unsigned tempPrefixLength = 5; … … 717 719 ASSERT(tempLength < bufferSize); 718 720 } 719 st d::string resultPath(WebString(tempPath.get(), tempLength).utf8());721 string resultPath(WebString(tempPath.get(), tempLength).utf8()); 720 722 resultPath.append(url.substr(tempPrefixLength)); 721 723 result->set(resultPath); … … 726 728 // Some layout tests use file://// which we resolve as a UNC path. Normalize 727 729 // them to just file:///. 728 while (StartsWithASCII(url, "file:////", false)) 730 string lowerUrl = url; 731 transform(lowerUrl.begin(), lowerUrl.end(), lowerUrl.begin(), ::tolower); 732 while (!lowerUrl.find("file:////")) { 729 733 url = url.substr(0, 8) + url.substr(9); 734 lowerUrl = lowerUrl.substr(0, 8) + lowerUrl.substr(9); 735 } 730 736 result->set(webkit_support::RewriteLayoutTestsURL(url).spec()); 731 737 } … … 1025 1031 return value.toInt32(); 1026 1032 if (value.isString()) { 1027 int number; 1028 if (StringToInt(value.toString(), &number)) 1029 return number; 1033 string stringSource = value.toString(); 1034 const char* source = stringSource.data(); 1035 char* end; 1036 long number = strtol(source, &end, 10); 1037 if (end == source + stringSource.length() && number >= numeric_limits<int32_t>::min() && number <= numeric_limits<int32_t>::max()) 1038 return static_cast<int32_t>(number); 1030 1039 } 1031 1040 logErrorToConsole("Invalid value for preference. Expected integer value.");
Note: See TracChangeset
for help on using the changeset viewer.