diff options
Diffstat (limited to 'WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm')
-rw-r--r-- | WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm index 5957e0e..ae4cc2f 100644 --- a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm +++ b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm @@ -30,22 +30,19 @@ namespace WTR { -void TestController::initializeInjectedBundlePath() +void TestController::platformInitialize() { - uint32_t pathLength = 0; - _NSGetExecutablePath(0, &pathLength); - char* path = (char*)malloc(pathLength); - _NSGetExecutablePath(path, &pathLength); - char* theRealPath = (char*)malloc(pathLength); - realpath(path, theRealPath); - - NSString *pwd = [[NSString stringWithUTF8String:theRealPath] stringByDeletingLastPathComponent]; - NSString *nsBundlePath = [pwd stringByAppendingPathComponent:@"InjectedBundle.bundle"]; +} - free(path); - free(theRealPath); - +void TestController::initializeInjectedBundlePath() +{ + NSString *nsBundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"InjectedBundle.bundle"]; m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath)); } +void TestController::initializeTestPluginPath() +{ + m_testPluginPath.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath])); +} + } // namespace WTR |