Changeset 94983 in webkit
- Timestamp:
- Sep 12, 2011, 3:21:59 PM (14 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r94978 r94983 1 2011-09-12 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r94976. 4 http://trac.webkit.org/changeset/94976 5 https://bugs.webkit.org/show_bug.cgi?id=67953 6 7 Broke a bunch of security/load& tests (Requested by rniwa on 8 #webkit). 9 10 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 11 (LayoutTestController::pathToLocalResource): 12 1 13 2011-09-12 Eric Seidel <eric@webkit.org> 2 14 -
trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r94976 r94983 356 356 } 357 357 358 JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef localResourcePath) 359 { 360 // Use the absolute path for the test from m_testPathOrURL 361 // to create an absolute path for the requested local resource. 362 // FIXME: This code should work on all *nix platforms and can be moved into LayoutTestController.cpp. 363 size_t maxBufferSize = JSStringGetMaximumUTF8CStringSize(localResourcePath); 364 char* resourcePathAsUTF8 = new char[maxBufferSize]; 365 size_t resourcePathAsUTF8BufferSize = JSStringGetUTF8CString(localResourcePath, resourcePathAsUTF8, maxBufferSize); 366 367 std::string resourcePathAsString(resourcePathAsUTF8, resourcePathAsUTF8BufferSize - 1); // Ignore the trailing \0 when creating the string. 368 delete[] resourcePathAsUTF8; 369 370 size_t resourceLayoutTestsIndex = resourcePathAsString.rfind("LayoutTests/"); 371 ASSERT(resourceLayoutTestsIndex); // Passed in paths must include "LayoutTests/" 372 size_t testLayoutTestsIndex = m_testPathOrURL.rfind("LayoutTests/"); 373 std::string resolvedResourcePath = m_testPathOrURL.substr(0, testLayoutTestsIndex) + resourcePathAsString.substr(resourceLayoutTestsIndex); 374 375 return JSStringCreateWithUTF8CString(resolvedResourcePath.c_str()); 358 JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url) 359 { 360 return JSStringRetain(url); // Do nothing on mac. 376 361 } 377 362
Note:
See TracChangeset
for help on using the changeset viewer.