Title: [100380] trunk/Tools
- Revision
- 100380
- Author
- [email protected]
- Date
- 2011-11-15 17:41:33 -0800 (Tue, 15 Nov 2011)
Log Message
TestWebKitAPI should not put its resources in the root products directory
https://bugs.webkit.org/show_bug.cgi?id=72446
Reviewed by Anders Carlsson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Change the copy resources phase to place the resources in a TestWebKitAPI.resources
directory.
* TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm:
(TEST_F):
* TestWebKitAPI/Tests/mac/DOMRangeOfString.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
(TestWebKitAPI::DeviceScaleFactorOnBack::url):
* TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
(TestWebKitAPI::DynamicDeviceScaleFactor::url):
* TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
(TestWebKitAPI::Util::createURLForResource):
Update calls to retrieve files from the bundle to look in the newly
created subdirectory.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (100379 => 100380)
--- trunk/Tools/ChangeLog 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/ChangeLog 2011-11-16 01:41:33 UTC (rev 100380)
@@ -1,3 +1,27 @@
+2011-11-15 Sam Weinig <[email protected]>
+
+ TestWebKitAPI should not put its resources in the root products directory
+ https://bugs.webkit.org/show_bug.cgi?id=72446
+
+ Reviewed by Anders Carlsson.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ Change the copy resources phase to place the resources in a TestWebKitAPI.resources
+ directory.
+
+ * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm:
+ (TEST_F):
+ * TestWebKitAPI/Tests/mac/DOMRangeOfString.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
+ (TestWebKitAPI::DeviceScaleFactorOnBack::url):
+ * TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
+ (TestWebKitAPI::DynamicDeviceScaleFactor::url):
+ * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
+ (TestWebKitAPI::Util::createURLForResource):
+ Update calls to retrieve files from the bundle to look in the newly
+ created subdirectory.
+
2011-11-15 Tony Chang <[email protected]>
Fix a webkitpy test caused by renaming the accelerate-video flag in r100355.
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2011-11-16 01:41:33 UTC (rev 100380)
@@ -122,7 +122,7 @@
BCB9F4FB112384C000A137E0 /* Copy Resources */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
- dstPath = "";
+ dstPath = TestWebKitAPI.resources;
dstSubfolderSpec = 7;
files = (
33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */,
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm 2011-11-16 01:41:33 UTC (rev 100380)
@@ -90,7 +90,7 @@
view.browsingContextController.loadDelegate = loadDelegate;
// Load the file.
- NSURL *nsURL = [[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html"];
+ NSURL *nsURL = [[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
[view.browsingContextController loadFileURL:nsURL restrictToFilesWithin:nil];
// Wait for the load to finish.
Modified: trunk/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm 2011-11-16 01:41:33 UTC (rev 100380)
@@ -52,7 +52,7 @@
RetainPtr<DOMRangeOfStringFrameLoadDelegate> frameLoadDelegate(AdoptNS, [DOMRangeOfStringFrameLoadDelegate new]);
webView.get().frameLoadDelegate = frameLoadDelegate.get();
- [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"DOMRangeOfString" withExtension:@"html"]]];
+ [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"DOMRangeOfString" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
Util::run(&didFinishLoad);
Modified: trunk/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm 2011-11-16 01:41:33 UTC (rev 100380)
@@ -41,7 +41,7 @@
template <typename View> void runTest(View);
// WebKitAgnosticTest
- virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"devicePixelRatio" withExtension:@"html"]; }
+ virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"devicePixelRatio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; }
virtual void didLoadURL(WebView *webView) { runTest(webView); }
virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
virtual void initializeView(WebView *);
Modified: trunk/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm 2011-11-16 01:41:33 UTC (rev 100380)
@@ -40,7 +40,7 @@
template <typename View> void runTest(View);
// WebKitAgnosticTest
- virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"devicePixelRatio" withExtension:@"html"]; }
+ virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"devicePixelRatio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; }
virtual void didLoadURL(WebView *webView) { runTest(webView); }
virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
};
Modified: trunk/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm (100379 => 100380)
--- trunk/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm 2011-11-16 01:36:17 UTC (rev 100379)
+++ trunk/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm 2011-11-16 01:41:33 UTC (rev 100380)
@@ -55,7 +55,7 @@
WKURLRef createURLForResource(const char* resource, const char* extension)
{
- NSURL *nsURL = [[NSBundle mainBundle] URLForResource:[NSString stringWithUTF8String:resource] withExtension:[NSString stringWithUTF8String:extension]];
+ NSURL *nsURL = [[NSBundle mainBundle] URLForResource:[NSString stringWithUTF8String:resource] withExtension:[NSString stringWithUTF8String:extension] subdirectory:@"TestWebKitAPI.resources"];
return WKURLCreateWithCFURL((CFURLRef)nsURL);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes