Changeset 106751 in webkit
- Timestamp:
- Feb 4, 2012 4:55:32 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r106749 r106751 1 2012-02-04 Sam Weinig <sam@webkit.org> 2 3 Add ability to send WKURLRequests in WebKit2 API user messages 4 https://bugs.webkit.org/show_bug.cgi?id=77819 5 6 Reviewed by Anders Carlsson. 7 8 Test: WebKit2UserMessageRoundTripTest API test. 9 10 * Shared/UserMessageCoders.h: 11 (WebKit::UserMessageEncoder::baseEncode): 12 (WebKit::UserMessageDecoder::baseDecode): 13 Add encode/decode for WebURLRequest. 14 1 15 2012-02-04 Dan Bernstein <mitz@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/UserMessageCoders.h
r95901 r106751 42 42 #include "WebString.h" 43 43 #include "WebURL.h" 44 #include "WebURLRequest.h" 44 45 #include "WebUserContentURLPattern.h" 45 46 … … 58 59 // - WebUInt64 -> WebUInt64 59 60 // - WebURL -> WebURL 61 // - WebURLRequest -> WebURLRequest 60 62 61 63 template<typename Owner> … … 141 143 WebURL* urlObject = static_cast<WebURL*>(m_root); 142 144 encoder->encode(urlObject->string()); 145 return true; 146 } 147 case APIObject::TypeURLRequest: { 148 WebURLRequest* urlRequestObject = static_cast<WebURLRequest*>(m_root); 149 encoder->encode(urlRequestObject->resourceRequest()); 143 150 return true; 144 151 } … … 204 211 // - WebUInt64 -> WebUInt64 205 212 // - WebURL -> WebURL 213 // - WebURLRequest -> WebURLRequest 206 214 207 215 template<typename Owner> … … 338 346 break; 339 347 } 348 case APIObject::TypeURLRequest: { 349 WebCore::ResourceRequest request; 350 if (!decoder->decode(request)) 351 return false; 352 coder.m_root = WebURLRequest::create(request); 353 break; 354 } 340 355 case APIObject::TypeUserContentURLPattern: { 341 356 String string; -
trunk/Tools/ChangeLog
r106749 r106751 1 2012-02-04 Sam Weinig <sam@webkit.org> 2 3 Add ability to send WKURLRequests in WebKit2 API user messages 4 https://bugs.webkit.org/show_bug.cgi?id=77819 5 6 Reviewed by Anders Carlsson. 7 8 Add testing for round-tripping WKTypes from the UIProcess, 9 to the WebProcess, and back. 10 11 - This commit adds a test fixture and tests for WKURLRequestRef, WKURLRef, and WKStringRef. 12 More can easily be added. 13 14 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 15 * TestWebKitAPI/Tests/WebKit2/UserMessage.cpp: Added. 16 (TestWebKitAPI): 17 (WebKit2UserMessageRoundTripTest): 18 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::WebKit2UserMessageRoundTripTest): 19 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didReceiveMessageFromInjectedBundle): 20 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): 21 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setInjectedBundleClient): 22 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient): 23 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): 24 (TestWebKitAPI::WebKit2UserMessageRoundTripTest::roundTrip): 25 (TestWebKitAPI::TEST_F): 26 * TestWebKitAPI/Tests/WebKit2/UserMessage_Bundle.cpp: Added. 27 (TestWebKitAPI): 28 (UserMessageTest): 29 (TestWebKitAPI::UserMessageTest::UserMessageTest): 30 (TestWebKitAPI::UserMessageTest::didReceiveMessage): 31 * TestWebKitAPI/mac/PlatformWebViewMac.mm: 32 (TestWebKitAPI::PlatformWebView::resizeTo): 33 (TestWebKitAPI): 34 * TestWebKitAPI/win/TestWebKitAPI.vcproj: 35 * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj: 36 1 37 2012-02-04 Dan Bernstein <mitz@apple.com> 2 38 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r106725 r106751 56 56 BC131A9B1171316900B69727 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131A9A1171316900B69727 /* main.mm */; }; 57 57 BC131AA9117131FC00B69727 /* TestsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC131AA8117131FC00B69727 /* TestsController.cpp */; }; 58 BC22D31514DC689800FFB1DD /* UserMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22D31314DC689800FFB1DD /* UserMessage.cpp */; }; 59 BC22D31914DC68B900FFB1DD /* UserMessage_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */; }; 58 60 BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */; }; 59 61 BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */; }; … … 221 223 BC131A9E1171317C00B69727 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; }; 222 224 BC131AA8117131FC00B69727 /* TestsController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = TestsController.cpp; sourceTree = "<group>"; }; 225 BC22D31314DC689800FFB1DD /* UserMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessage.cpp; sourceTree = "<group>"; }; 226 BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessage_Bundle.cpp; sourceTree = "<group>"; }; 223 227 BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AboutBlankLoad.cpp; sourceTree = "<group>"; }; 224 228 BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanHandleRequest_Bundle.cpp; sourceTree = "<group>"; }; … … 471 475 C0ADBE8212FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp */, 472 476 C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */, 477 BC22D31314DC689800FFB1DD /* UserMessage.cpp */, 478 BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */, 473 479 520BCF4B141EB09E00937EA8 /* WebArchive.cpp */, 474 480 520BCF4A141EB09E00937EA8 /* WebArchive_Bundle.cpp */, … … 762 768 93F1DB5514DB1B730024C362 /* NewFirstVisuallyNonEmptyLayoutFails.cpp in Sources */, 763 769 93F7E86C14DC8E4D00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames.cpp in Sources */, 770 BC22D31514DC689800FFB1DD /* UserMessage.cpp in Sources */, 764 771 ); 765 772 runOnlyForDeploymentPostprocessing = 0; … … 788 795 93F1DB5714DB1B840024C362 /* NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp in Sources */, 789 796 93F7E86F14DC8E5C00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp in Sources */, 797 BC22D31914DC68B900FFB1DD /* UserMessage_Bundle.cpp in Sources */, 790 798 ); 791 799 runOnlyForDeploymentPostprocessing = 0; -
trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm
r101532 r106751 56 56 } 57 57 58 void PlatformWebView::resizeTo(unsigned width, unsigned height)59 {60 [m_view setFrame:NSMakeRect(0, 0, width, height)];61 }62 63 58 PlatformWebView::~PlatformWebView() 64 59 { … … 67 62 [m_view release]; 68 63 } 64 65 void PlatformWebView::resizeTo(unsigned width, unsigned height) 66 { 67 [m_view setFrame:NSMakeRect(0, 0, width, height)]; 68 } 69 69 70 70 71 WKPageRef PlatformWebView::page() const -
trunk/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
r103833 r106751 558 558 <File 559 559 RelativePath="..\Tests\WebKit2\SpacebarScrolling.cpp" 560 > 561 </File> 562 <File 563 RelativePath="..\Tests\WebKit2\UserMessage.cpp" 560 564 > 561 565 </File> -
trunk/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
r95122 r106751 433 433 </File> 434 434 <File 435 RelativePath="..\Tests\WebKit2\UserMessage_Bundle.cpp" 436 > 437 </File> 438 <File 435 439 RelativePath="..\Tests\WebKit2\WebArchive_Bundle.cpp" 436 440 >
Note: See TracChangeset
for help on using the changeset viewer.