+2012-06-07 Joshua Lock <joshua.lock@intel.com>
+
+ [EFL][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()
+ https://bugs.webkit.org/show_bug.cgi?id=67255
+
+ Reviewed by Dirk Pranke.
+
+ * platform/efl/TestExpectations: unskip
+ fast/dom/frame-loading-via-document-write.html now that
+ LayoutTestController::pathToLocalResource() is implemented for EFL.
+
2012-06-07 Noel Gordon <noel.gordon@gmail.com>
[chromium] Use WEBPImportPictureRGBX|BGRX to import picture data
BUGWK84333 : http/tests/local/formdata = TEXT
BUGWK84333 : http/tests/security/clipboard/clipboard-file-access.html = TEXT
-// LayoutTestController.pathToLocalResource needs special handling of file URLs to /tmp.
-BUGWK84336 : fast/dom/frame-loading-via-document-write.html = TIMEOUT TEXT
-
// Missing execCommand('copy') and execCommand('paste').
BUGWK84338 : editing/deleting/paste-with-transparent-background-color.html = TEXT
BUGWK84338 : editing/execCommand/find-after-replace.html = TEXT MISSING
+2012-06-07 Joshua Lock <joshua.lock@intel.com>
+
+ [EFL][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()
+ https://bugs.webkit.org/show_bug.cgi?id=67255
+
+ Reviewed by Dirk Pranke.
+
+ Implement pathToLocalResource to redirect file:///tmp URL's to
+ DUMPRENDERTREE_TEMP and file:///tmp/LayoutTests to point to the
+ LayoutTests sub-directory of the WebKit source tree.
+
+ * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+ (LayoutTestController::pathToLocalResource):
+
2012-06-07 Tony Payne <tpayne@chromium.org>
[chromium] Allow LayoutTests under new git workflow
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
* Copyright (C) 2011 ProFUSION Embedded Systems
* Copyright (C) 2011 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url)
{
- // Function introduced in r28690. This may need special-casing on Windows.
- return JSStringRetain(url); // Do nothing on Unix.
+ String requestedUrl(url->characters());
+ String resourceRoot;
+ String requestedRoot;
+
+ if (requestedUrl.find("LayoutTests") != notFound) {
+ // If the URL contains LayoutTests we need to remap that to
+ // LOCAL_RESOURCE_ROOT which is the path of the LayoutTests directory
+ // within the WebKit source tree.
+ requestedRoot = "/tmp/LayoutTests";
+ resourceRoot = getenv("LOCAL_RESOURCE_ROOT");
+ } else if (requestedUrl.find("tmp") != notFound) {
+ // If the URL is a child of /tmp we need to convert it to be a child
+ // DUMPRENDERTREE_TEMP replace tmp with DUMPRENDERTREE_TEMP
+ requestedRoot = "/tmp";
+ resourceRoot = getenv("DUMPRENDERTREE_TEMP");
+ }
+
+ size_t indexOfRootStart = requestedUrl.reverseFind(requestedRoot);
+ size_t indexOfSeparatorAfterRoot = indexOfRootStart + requestedRoot.length();
+ String fullPathToUrl = "file://" + resourceRoot + requestedUrl.substring(indexOfSeparatorAfterRoot);
+
+ return JSStringCreateWithUTF8CString(fullPathToUrl.utf8().data());
}
void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)