summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/mac
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/mac')
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig1
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm25
-rw-r--r--WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm14
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCController.m34
-rw-r--r--WebKitTools/DumpRenderTree/mac/UIDelegate.mm11
5 files changed, 14 insertions, 71 deletions
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
index d2291a0..bd5b1e0 100644
--- a/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
@@ -3,7 +3,6 @@ FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(MAC_OS_X_VERSION_MAJOR));
FRAMEWORK_SEARCH_PATHS_ = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks
FRAMEWORK_SEARCH_PATHS_1040 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks
FRAMEWORK_SEARCH_PATHS_1050 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks
-FRAMEWORK_SEARCH_PATHS_1060 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks
DEBUG_INFORMATION_FORMAT = dwarf
PREBINDING = NO
GCC_C_LANGUAGE_STANDARD = gnu99
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 4d5ea72..6df150d 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -550,17 +550,15 @@ static void convertWebResourceDataToString(NSMutableDictionary *resource)
}
}
-static void normalizeWebResourceURL(NSMutableString *webResourceURL)
+static void normalizeWebResourceURL(NSMutableString *webResourceURL, NSString *oldURLBase)
{
- static int fileUrlLength = [@"file://" length];
- NSRange layoutTestsWebArchivePathRange = [webResourceURL rangeOfString:@"/LayoutTests/" options:NSBackwardsSearch];
- if (layoutTestsWebArchivePathRange.location == NSNotFound)
- return;
- NSRange currentWorkingDirectoryRange = NSMakeRange(fileUrlLength, layoutTestsWebArchivePathRange.location - fileUrlLength);
- [webResourceURL replaceCharactersInRange:currentWorkingDirectoryRange withString:@""];
+ [webResourceURL replaceOccurrencesOfString:oldURLBase
+ withString:@"file://"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [webResourceURL length])];
}
-static void convertWebResourceResponseToDictionary(NSMutableDictionary *propertyList)
+static void convertWebResourceResponseToDictionary(NSMutableDictionary *propertyList, NSString *oldURLBase)
{
NSURLResponse *response = nil;
NSData *responseData = [propertyList objectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
@@ -575,7 +573,7 @@ static void convertWebResourceResponseToDictionary(NSMutableDictionary *property
NSMutableDictionary *responseDictionary = [[NSMutableDictionary alloc] init];
NSMutableString *urlString = [[[response URL] description] mutableCopy];
- normalizeWebResourceURL(urlString);
+ normalizeWebResourceURL(urlString, oldURLBase);
[responseDictionary setObject:urlString forKey:@"URL"];
[urlString release];
@@ -610,6 +608,9 @@ static NSString *serializeWebArchiveToXML(WebArchive *webArchive)
if (!propertyList)
return errorString;
+ // Normalize WebResourceResponse and WebResourceURL values in plist for testing
+ NSString *cwdURL = [@"file://" stringByAppendingString:[[[NSFileManager defaultManager] currentDirectoryPath] stringByExpandingTildeInPath]];
+
NSMutableArray *resources = [NSMutableArray arrayWithCapacity:1];
[resources addObject:propertyList];
@@ -618,7 +619,7 @@ static NSString *serializeWebArchiveToXML(WebArchive *webArchive)
[resources removeObjectAtIndex:0];
NSMutableDictionary *mainResource = [resourcePropertyList objectForKey:@"WebMainResource"];
- normalizeWebResourceURL([mainResource objectForKey:@"WebResourceURL"]);
+ normalizeWebResourceURL([mainResource objectForKey:@"WebResourceURL"], cwdURL);
convertWebResourceDataToString(mainResource);
// Add subframeArchives to list for processing
@@ -630,8 +631,8 @@ static NSString *serializeWebArchiveToXML(WebArchive *webArchive)
NSEnumerator *enumerator = [subresources objectEnumerator];
NSMutableDictionary *subresourcePropertyList;
while ((subresourcePropertyList = [enumerator nextObject])) {
- normalizeWebResourceURL([subresourcePropertyList objectForKey:@"WebResourceURL"]);
- convertWebResourceResponseToDictionary(subresourcePropertyList);
+ normalizeWebResourceURL([subresourcePropertyList objectForKey:@"WebResourceURL"], cwdURL);
+ convertWebResourceResponseToDictionary(subresourcePropertyList, cwdURL);
convertWebResourceDataToString(subresourcePropertyList);
}
}
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index 4774310..b321319 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -37,14 +37,12 @@
#import <JavaScriptCore/JSStringRef.h>
#import <JavaScriptCore/JSStringRefCF.h>
#import <WebKit/WebBackForwardList.h>
-#import <WebKit/WebDatabaseManagerPrivate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebHistory.h>
#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebPreferences.h>
#import <WebKit/WebPreferencesPrivate.h>
-#import <WebKit/WebSecurityOriginPrivate.h>
#import <WebKit/WebView.h>
#import <WebKit/WebViewPrivate.h>
#import <wtf/RetainPtr.h>
@@ -67,11 +65,6 @@ void LayoutTestController::addDisallowedURL(JSStringRef url)
CFSetAddValue(disallowedURLs, [request URL]);
}
-void LayoutTestController::clearAllDatabases()
-{
- [[WebDatabaseManager sharedWebDatabaseManager] deleteAllDatabases];
-}
-
void LayoutTestController::clearBackForwardList()
{
WebBackForwardList *backForwardList = [[mainFrame webView] backForwardList];
@@ -177,13 +170,6 @@ void LayoutTestController::setCustomPolicyDelegate(bool setDelegate)
[[mainFrame webView] setPolicyDelegate:nil];
}
-void LayoutTestController::setDatabaseQuota(unsigned long long quota)
-{
- WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithProtocol:@"file" domain:nil];
- [origin setQuota:quota];
- [origin release];
-}
-
void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
{
NSView *documentView = [[mainFrame frameView] documentView];
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m
index 9ca9299..1b9abb7 100644
--- a/WebKitTools/DumpRenderTree/mac/ObjCController.m
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m
@@ -28,28 +28,11 @@
#import "ObjCController.h"
-#import <JavaScriptCore/JavaScriptCore.h>
#import <WebKit/DOMAbstractView.h>
#import <WebKit/WebScriptObject.h>
#import <WebKit/WebView.h>
-#import <pthread.h>
#import <wtf/Assertions.h>
-static void* runJavaScriptThread(void* arg)
-{
- JSGlobalContextRef ctx = JSGlobalContextCreate(0);
- JSStringRef scriptRef = JSStringCreateWithUTF8CString("'Hello World!'");
-
- JSValueRef exception = 0;
- JSEvaluateScript(ctx, scriptRef, 0, 0, 0, &exception);
- ASSERT(!exception);
-
- JSGlobalContextRelease(ctx);
- JSStringRelease(scriptRef);
-
- return 0;
-}
-
@implementation ObjCController
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
@@ -63,7 +46,6 @@ static void* runJavaScriptThread(void* arg)
|| aSelector == @selector(testWrapperRoundTripping:)
|| aSelector == @selector(accessStoredWebScriptObject)
|| aSelector == @selector(storeWebScriptObject:)
- || aSelector == @selector(testValueForKey)
)
return NO;
return YES;
@@ -85,8 +67,6 @@ static void* runJavaScriptThread(void* arg)
return @"testWrapperRoundTripping";
if (aSelector == @selector(storeWebScriptObject:))
return @"storeWebScriptObject";
- if (aSelector == @selector(testValueForKey))
- return @"testValueForKey";
return nil;
}
@@ -135,20 +115,6 @@ static void* runJavaScriptThread(void* arg)
return num;
}
-- (void)testValueForKey
-{
- ASSERT(storedWebScriptObject);
-
- @try {
- [storedWebScriptObject valueForKey:@"ThisKeyDoesNotExist"];
- } @catch (NSException *e) {
- }
-
- pthread_t pthread;
- pthread_create(&pthread, 0, &runJavaScriptThread, 0);
- pthread_join(pthread, 0);
-}
-
- (BOOL)testWrapperRoundTripping:(WebScriptObject *)webScriptObject
{
JSObjectRef jsObject = [webScriptObject JSObject];
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
index 9c440a7..29f3ddd 100644
--- a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
@@ -128,19 +128,10 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier
{
- if (!done && layoutTestController->dumpDatabaseCallbacks())
- printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n", [[origin protocol] UTF8String], [[origin domain] UTF8String],
- [origin port], [databaseIdentifier UTF8String]);
-
- static const unsigned long long defaultQuota = 5 * 1024 * 1024;
+ static const unsigned long long defaultQuota = 5 * 1024 * 1024;
[origin setQuota:defaultQuota];
}
-- (void)webView:(WebView *)sender setStatusText:(NSString *)text
-{
- if (layoutTestController->dumpStatusCallbacks())
- printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", [text UTF8String]);
-}
- (void)dealloc
{