Changeset 61906 in webkit
- Timestamp:
- Jun 25, 2010 2:40:12 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r61902 r61906 1 2010-06-25 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Patch for https://bugs.webkit.org/show_bug.cgi?id=41226 6 Flesh out injected bundle code for WebKitTestRunner and add basic LayoutTestController. 7 8 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: Added. 9 (WTR::InjectedBundle::shared): 10 (WTR::InjectedBundle::InjectedBundle): 11 (WTR::InjectedBundle::_didCreatePage): 12 (WTR::InjectedBundle::_willDestroyPage): 13 (WTR::InjectedBundle::_didRecieveMessage): 14 (WTR::InjectedBundle::initialize): 15 (WTR::InjectedBundle::didCreatePage): 16 (WTR::InjectedBundle::willDestroyPage): 17 (WTR::InjectedBundle::didRecieveMessage): 18 * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Added. 19 (WTR::InjectedBundle::layoutTestController): 20 * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: 21 (WKBundleInitialize): 22 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Added. 23 (WTR::InjectedBundlePage::InjectedBundlePage): 24 (WTR::InjectedBundlePage::~InjectedBundlePage): 25 (WTR::InjectedBundlePage::_didStartProvisionalLoadForFrame): 26 (WTR::InjectedBundlePage::_didReceiveServerRedirectForProvisionalLoadForFrame): 27 (WTR::InjectedBundlePage::_didFailProvisionalLoadWithErrorForFrame): 28 (WTR::InjectedBundlePage::_didCommitLoadForFrame): 29 (WTR::InjectedBundlePage::_didFinishLoadForFrame): 30 (WTR::InjectedBundlePage::_didFailLoadWithErrorForFrame): 31 (WTR::InjectedBundlePage::_didReceiveTitleForFrame): 32 (WTR::InjectedBundlePage::_didClearWindowForFrame): 33 (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): 34 (WTR::InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame): 35 (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): 36 (WTR::InjectedBundlePage::didCommitLoadForFrame): 37 (WTR::InjectedBundlePage::didFinishLoadForFrame): 38 (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): 39 (WTR::InjectedBundlePage::didReceiveTitleForFrame): 40 (WTR::InjectedBundlePage::didClearWindowForFrame): 41 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Added. 42 (WTR::InjectedBundlePage::page): 43 * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: Added. 44 (WTR::LayoutTestController::create): 45 (WTR::LayoutTestController::LayoutTestController): 46 (WTR::LayoutTestController::~LayoutTestController): 47 (WTR::dumpAsTextCallback): 48 (WTR::layoutTestControllerObjectFinalize): 49 (WTR::LayoutTestController::makeWindowObject): 50 (WTR::LayoutTestController::getJSClass): 51 (WTR::LayoutTestController::staticFunctions): 52 * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Added. 53 (WTR::LayoutTestController::dumpAsText): 54 (WTR::LayoutTestController::setDumpAsText): 55 * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 56 1 57 2010-06-25 Sam Weinig <sam@webkit.org> 2 58 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
r61769 r61906 24 24 */ 25 25 26 #include <WebKit2/WKBundle.h>26 #include "InjectedBundle.h" 27 27 #include <WebKit2/WKBundleInitialize.h> 28 #include <WebKit2/WKBundlePage.h>29 #include <WebKit2/WebKit2.h>30 31 static WKBundleRef globalBundle;32 33 // WKBundlePageClient34 35 void _didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)36 {37 }38 39 void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)40 {41 }42 43 void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)44 {45 }46 47 void _didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)48 {49 }50 51 void _didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)52 {53 }54 55 void _didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)56 {57 }58 59 void _didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo)60 {61 }62 63 void _didClearWindow(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo)64 {65 }66 67 // WKBundleClient68 69 void _didCreatePage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo)70 {71 WKBundlePageClient client = {72 0,73 0,74 _didStartProvisionalLoadForFrame,75 _didReceiveServerRedirectForProvisionalLoadForFrame,76 _didFailProvisionalLoadWithErrorForFrame,77 _didCommitLoadForFrame,78 _didFinishLoadForFrame,79 _didFailLoadWithErrorForFrame,80 _didReceiveTitleForFrame,81 _didClearWindow82 };83 WKBundlePageSetClient(page, &client);84 }85 86 void _willDestroyPage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo)87 {88 }89 90 void _didRecieveMessage(WKBundleRef bundle, WKStringRef message, const void *clientInfo)91 {92 }93 28 94 29 extern "C" void WKBundleInitialize(WKBundleRef bundle) 95 30 { 96 globalBundle = bundle; 97 98 WKBundleClient client = { 99 0, 100 0, 101 _didCreatePage, 102 _willDestroyPage, 103 _didRecieveMessage 104 }; 105 WKBundleSetClient(bundle, &client); 31 WTR::InjectedBundle::shared().initialize(bundle); 106 32 } -
trunk/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
r61769 r61906 18 18 BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */; }; 19 19 BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8C795B11D2785D004535A1 /* TestControllerMac.mm */; }; 20 BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; }; 21 BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */; }; 22 BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */; }; 20 23 BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; }; 21 24 BCDA2ABF1190B51A00C3BC47 /* TestInvocationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCDA2ABE1190B51A00C3BC47 /* TestInvocationMac.mm */; }; … … 63 66 BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = "<group>"; }; 64 67 BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = "<group>"; }; 68 BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; }; 69 BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; }; 70 BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePage.cpp; sourceTree = "<group>"; }; 71 BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePage.h; sourceTree = "<group>"; }; 72 BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTestController.h; sourceTree = "<group>"; }; 73 BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutTestController.cpp; sourceTree = "<group>"; }; 65 74 BCD7D2F611921278006DB7EE /* TestInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestInvocation.h; sourceTree = "<group>"; }; 66 75 BCD7D2F711921278006DB7EE /* TestInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestInvocation.cpp; sourceTree = "<group>"; }; … … 142 151 isa = PBXGroup; 143 152 children = ( 153 BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */, 154 BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */, 144 155 BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */, 156 BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */, 157 BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */, 158 BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */, 159 BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */, 145 160 ); 146 161 path = InjectedBundle; … … 263 278 files = ( 264 279 BC251A3E11D16831002EBC01 /* InjectedBundleMain.cpp in Sources */, 280 BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */, 281 BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */, 282 BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */, 265 283 ); 266 284 runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset
for help on using the changeset viewer.