Changeset 129346 in webkit
- Timestamp:
- Sep 24, 2012 4:38:00 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r129343 r129346 1 2012-09-24 Vivek Galatage <vivekgalatage@gmail.com> 2 3 Web Inspector: implement testing harness for pure protocol tests. 4 https://bugs.webkit.org/show_bug.cgi?id=90675 5 6 Reviewed by Yury Semikhatsky. 7 8 Added export symbols required for Gtk+ to support the Inspector Protocol 9 testing harness. 10 11 * Source/autotools/symbols.filter: 12 1 13 2012-09-24 Simon Hausmann <simon.hausmann@digia.com> 2 14 -
trunk/LayoutTests/ChangeLog
r129344 r129346 1 2012-09-24 Vivek Galatage <vivekgalatage@gmail.com> 2 3 Web Inspector: implement testing harness for pure protocol tests. 4 https://bugs.webkit.org/show_bug.cgi?id=90675 5 6 Reviewed by Yury Semikhatsky. 7 8 Adding the resources required for the dummy frontend page to load minimal 9 frontend. These resources provide the mechanism to talk to the Inspector Backend. 10 11 Adding the inspector-protocol folder to host the relevant test cases 12 utilizing the inspector protocol test harness. Added an example test 13 case for getting all supported CSS properties using the inspector 14 protocol and searching for a particular property being supported. 15 16 * http/tests/inspector-protocol: Added. 17 * http/tests/inspector-protocol/resources: Added. 18 * http/tests/inspector-protocol/resources/InspectorTest.js: Added. 19 (InspectorTest.sendCommand): 20 (WebInspector.dispatchMessageFromBackend): 21 (InspectorTest.log): 22 (InspectorTest.completeTest): 23 * http/tests/inspector-protocol/resources/protocol-test.html: Added. 24 * http/tests/inspector-protocol/resources/protocol-test.js: Added. 25 (log): 26 (closeTest): 27 (runTest): 28 * inspector-protocol: Added. 29 * inspector-protocol/css-getSupportedCSSProperties-expected.txt: Added. 30 * inspector-protocol/css-getSupportedCSSProperties.html: Added. 31 1 32 2012-09-24 Keishi Hattori <keishi@webkit.org> 2 33 -
trunk/Source/WebCore/ChangeLog
r129344 r129346 1 2012-09-24 Vivek Galatage <vivekgalatage@gmail.com> 2 3 Web Inspector: implement testing harness for pure protocol tests. 4 https://bugs.webkit.org/show_bug.cgi?id=90675 5 6 Reviewed by Yury Semikhatsky. 7 8 Implementing the testing harness as the APIs of Internals object not 9 only reduced platform specific patching of DRTs but also minimized the 10 the effort required to open up the new dummy inspector Frontend. 11 12 The openDummyInspectorFrontend method will return the handle to newly 13 created DOMWindow. This DOMWindow object can be utilized inside the test 14 case to communicate using postMessage WebAPI. 15 16 The newly created DOMWindow will host the protocol-test.html which 17 will seed the necessary JS libraries to communicate with the 18 InspectorBackend. 19 20 Test: inspector-protocol/css-getSupportedCSSProperties.html 21 22 * WebCore.exp.in: 23 * WebCore.gypi: 24 * inspector/InspectorClient.h: 25 (InspectorClient): 26 * testing/Internals.cpp: 27 (InspectorFrontendClientDummy): 28 (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy): 29 (WebCore): 30 (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy): 31 (InspectorFrontendChannelDummy): 32 (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy): 33 (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy): 34 (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend): 35 (WebCore::Internals::consoleMessageArgumentCounts): 36 (WebCore::Internals::openDummyInspectorFrontend): 37 (WebCore::Internals::closeDummyInspectorFrontend): 38 * testing/Internals.h: 39 (WebCore): 40 (Internals): 41 * testing/Internals.idl: 42 1 43 2012-09-24 Keishi Hattori <keishi@webkit.org> 2 44 -
trunk/Source/WebCore/WebCore.exp.in
r129097 r129346 2236 2236 __ZN7WebCore17InspectorCounters12counterValueENS0_11CounterTypeE 2237 2237 __ZN7WebCore19InspectorController15profilerEnabledEv 2238 __ZN7WebCore19InspectorController15connectFrontendEPNS_24InspectorFrontendChannelE 2238 2239 __ZN7WebCore19InspectorController18disconnectFrontendEv 2239 2240 __ZN7WebCore19InspectorController18setProfilerEnabledEb … … 2274 2275 __ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN3WTF10PassOwnPtrINS0_8SettingsEEE 2275 2276 __ZN7WebCore28InspectorFrontendClientLocalD2Ev 2277 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_9DOMWindowE 2278 __ZN7WebCore9DOMWindow4openERKN3WTF6StringERKNS1_12AtomicStringES4_PS0_S8_ 2279 __ZN7WebCore9DOMWindow5closeEPNS_22ScriptExecutionContextE 2276 2280 __ZNK7WebCore19InspectorController13drawHighlightERNS_15GraphicsContextE 2281 __ZNK7WebCore9DOMWindow8documentEv 2277 2282 #endif 2278 2283 -
trunk/Source/WebCore/WebCore.gypi
r129257 r129346 6314 6314 ], 6315 6315 'webcore_test_support_files': [ 6316 'inspector/InspectorFrontendClientLocal.cpp', 6317 'inspector/InspectorFrontendClientLocal.h', 6316 6318 'testing/v8/WebCoreTestSupport.cpp', 6317 6319 'testing/v8/WebCoreTestSupport.h', -
trunk/Source/WebCore/inspector/InspectorClient.h
r122838 r129346 72 72 virtual bool supportsFrameInstrumentation() { return false; } 73 73 74 bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message);74 static bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message); 75 75 }; 76 76 -
trunk/Source/WebCore/testing/Internals.cpp
r128677 r129346 33 33 #include "ComposedShadowTreeWalker.h" 34 34 #include "DOMStringList.h" 35 #include "DOMWindow.h" 35 36 #include "Document.h" 36 37 #include "DocumentMarker.h" … … 47 48 #include "HTMLTextAreaElement.h" 48 49 #include "HistoryItem.h" 50 #include "InspectorClient.h" 49 51 #include "InspectorConsoleAgent.h" 50 52 #include "InspectorController.h" 51 53 #include "InspectorCounters.h" 54 #include "InspectorFrontendChannel.h" 55 #include "InspectorFrontendClientLocal.h" 52 56 #include "InspectorInstrumentation.h" 53 57 #include "InspectorOverlay.h" … … 105 109 106 110 using namespace HTMLNames; 111 112 class InspectorFrontendClientDummy : public InspectorFrontendClientLocal { 113 public: 114 InspectorFrontendClientDummy(InspectorController*, Page*); 115 virtual ~InspectorFrontendClientDummy() { } 116 virtual void attachWindow() OVERRIDE { } 117 virtual void detachWindow() OVERRIDE { } 118 119 virtual String localizedStringsURL() OVERRIDE { return String(); } 120 virtual String hiddenPanels() OVERRIDE { return String(); } 121 122 virtual void bringToFront() OVERRIDE { } 123 virtual void closeWindow() OVERRIDE { } 124 125 virtual void inspectedURLChanged(const String&) OVERRIDE { } 126 127 protected: 128 virtual void setAttachedWindowHeight(unsigned) OVERRIDE { } 129 }; 130 131 InspectorFrontendClientDummy::InspectorFrontendClientDummy(InspectorController* controller, Page* page) 132 : InspectorFrontendClientLocal(controller, page, adoptPtr(new InspectorFrontendClientLocal::Settings())) 133 { 134 } 135 136 class InspectorFrontendChannelDummy : public InspectorFrontendChannel { 137 public: 138 explicit InspectorFrontendChannelDummy(Page*); 139 virtual ~InspectorFrontendChannelDummy() { } 140 virtual bool sendMessageToFrontend(const String& message) OVERRIDE; 141 142 private: 143 Page* m_frontendPage; 144 }; 145 146 InspectorFrontendChannelDummy::InspectorFrontendChannelDummy(Page* page) 147 : m_frontendPage(page) 148 { 149 } 150 151 bool InspectorFrontendChannelDummy::sendMessageToFrontend(const String& message) 152 { 153 return InspectorClient::doDispatchMessageOnFrontendPage(m_frontendPage, message); 154 } 107 155 108 156 static bool markerTypesFrom(const String& markerType, DocumentMarker::MarkerTypes& result) … … 1062 1110 return result; 1063 1111 } 1112 1113 PassRefPtr<DOMWindow> Internals::openDummyInspectorFrontend(const String& url) 1114 { 1115 Page* page = contextDocument()->frame()->page(); 1116 ASSERT(page); 1117 1118 DOMWindow* window = page->mainFrame()->document()->domWindow(); 1119 ASSERT(window); 1120 1121 m_frontendWindow = window->open(url, "", "", window, window); 1122 ASSERT(m_frontendWindow); 1123 1124 Page* frontendPage = m_frontendWindow->document()->page(); 1125 ASSERT(frontendPage); 1126 1127 OwnPtr<InspectorFrontendClientDummy> frontendClient = adoptPtr(new InspectorFrontendClientDummy(page->inspectorController(), frontendPage)); 1128 1129 frontendPage->inspectorController()->setInspectorFrontendClient(frontendClient.release()); 1130 1131 m_frontendChannel = adoptPtr(new InspectorFrontendChannelDummy(frontendPage)); 1132 1133 page->inspectorController()->connectFrontend(m_frontendChannel.get()); 1134 1135 return m_frontendWindow; 1136 } 1137 1138 void Internals::closeDummyInspectorFrontend() 1139 { 1140 Page* page = contextDocument()->frame()->page(); 1141 ASSERT(page); 1142 ASSERT(m_frontendWindow); 1143 1144 page->inspectorController()->disconnectFrontend(); 1145 1146 m_frontendChannel.release(); 1147 1148 m_frontendWindow->close(m_frontendWindow->scriptExecutionContext()); 1149 m_frontendWindow.release(); 1150 } 1064 1151 #endif // ENABLE(INSPECTOR) 1065 1152 -
trunk/Source/WebCore/testing/Internals.h
r128677 r129346 39 39 class ClientRectList; 40 40 class DOMStringList; 41 class DOMWindow; 41 42 class Document; 42 43 class DocumentMarker; 43 44 class Element; 44 45 class Frame; 46 class InspectorFrontendChannelDummy; 45 47 class InternalSettings; 46 48 class Node; … … 193 195 unsigned numberOfLiveDocuments() const; 194 196 Vector<String> consoleMessageArgumentCounts(Document*) const; 197 PassRefPtr<DOMWindow> openDummyInspectorFrontend(const String& url); 198 void closeDummyInspectorFrontend(); 195 199 #endif 196 200 … … 224 228 225 229 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionCode&); 230 #if ENABLE(INSPECTOR) 231 RefPtr<DOMWindow> m_frontendWindow; 232 OwnPtr<InspectorFrontendChannelDummy> m_frontendChannel; 233 #endif 226 234 }; 227 235 -
trunk/Source/WebCore/testing/Internals.idl
r128677 r129346 172 172 [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments(); 173 173 [Conditional=INSPECTOR] sequence<String> consoleMessageArgumentCounts(in Document document); 174 [Conditional=INSPECTOR] DOMWindow openDummyInspectorFrontend(in DOMString url); 175 [Conditional=INSPECTOR] void closeDummyInspectorFrontend(); 174 176 175 177 DOMString counterValue(in Element element); -
trunk/Source/WebKit2/ChangeLog
r129338 r129346 1 2012-09-24 Vivek Galatage <vivekgalatage@gmail.com> 2 3 Web Inspector: implement testing harness for pure protocol tests. 4 https://bugs.webkit.org/show_bug.cgi?id=90675 5 6 Reviewed by Yury Semikhatsky. 7 8 Adding the export symbol definitions required on Apple Windows and WinCairo 9 ports to support Inspector Protocol testing harness. 10 11 * win/WebKit2.def: 12 * win/WebKit2CFLite.def: 13 1 14 2012-09-24 KwangYong Choi <ky0.choi@samsung.com> 2 15 -
trunk/Source/WebKit2/win/WebKit2.def
r129165 r129346 290 290 ?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z 291 291 ?pageSizeAndMarginsInPixels@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@HHHHHHH@Z 292 ??0InspectorFrontendClientLocal@WebCore@@QAE@PAVInspectorController@1@PAVPage@1@V?$PassOwnPtr@VSettings@InspectorFrontendClientLocal@WebCore@@@WTF@@@Z 293 ??1InspectorFrontendClientLocal@WebCore@@UAE@XZ 294 ?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UAEXI@Z 295 ?close@DOMWindow@WebCore@@QAEXPAVScriptExecutionContext@2@@Z 296 ?connectFrontend@InspectorController@WebCore@@QAEXPAVInspectorFrontendChannel@2@@Z 297 ?disconnectFrontend@InspectorController@WebCore@@QAEXXZ 298 ?document@DOMWindow@WebCore@@QBEPAVDocument@2@XZ 299 ?doDispatchMessageOnFrontendPage@InspectorClient@WebCore@@SA_NPAVPage@2@ABVString@WTF@@@Z 300 ?frontendLoaded@InspectorFrontendClientLocal@WebCore@@UAEXXZ 301 ?getProperty@Settings@InspectorFrontendClientLocal@WebCore@@UAE?AVString@WTF@@ABV45@@Z 302 ?moveWindowBy@InspectorFrontendClientLocal@WebCore@@UAEXMM@Z 303 ?open@DOMWindow@WebCore@@QAE?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@ABVString@4@ABVAtomicString@4@0PAV12@2@Z 304 ?openInNewTab@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z 305 ?requestAttachWindow@InspectorFrontendClientLocal@WebCore@@UAEXXZ 306 ?requestDetachWindow@InspectorFrontendClientLocal@WebCore@@UAEXXZ 307 ?sendMessageToBackend@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z 308 ?setInspectorFrontendClient@InspectorController@WebCore@@QAEXV?$PassOwnPtr@VInspectorFrontendClient@WebCore@@@WTF@@@Z 309 ?setProperty@Settings@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@0@Z 310 ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVDOMWindow@1@@Z 311 ?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UAEXXZ -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r129165 r129346 280 280 ?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z 281 281 ?pageSizeAndMarginsInPixels@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@HHHHHHH@Z 282 ??0InspectorFrontendClientLocal@WebCore@@QAE@PAVInspectorController@1@PAVPage@1@V?$PassOwnPtr@VSettings@InspectorFrontendClientLocal@WebCore@@@WTF@@@Z 283 ??1InspectorFrontendClientLocal@WebCore@@UAE@XZ 284 ?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UAEXI@Z 285 ?close@DOMWindow@WebCore@@QAEXPAVScriptExecutionContext@2@@Z 286 ?connectFrontend@InspectorController@WebCore@@QAEXPAVInspectorFrontendChannel@2@@Z 287 ?disconnectFrontend@InspectorController@WebCore@@QAEXXZ 288 ?document@DOMWindow@WebCore@@QBEPAVDocument@2@XZ 289 ?doDispatchMessageOnFrontendPage@InspectorClient@WebCore@@SA_NPAVPage@2@ABVString@WTF@@@Z 290 ?frontendLoaded@InspectorFrontendClientLocal@WebCore@@UAEXXZ 291 ?getProperty@Settings@InspectorFrontendClientLocal@WebCore@@UAE?AVString@WTF@@ABV45@@Z 292 ?moveWindowBy@InspectorFrontendClientLocal@WebCore@@UAEXMM@Z 293 ?open@DOMWindow@WebCore@@QAE?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@ABVString@4@ABVAtomicString@4@0PAV12@2@Z 294 ?openInNewTab@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z 295 ?requestAttachWindow@InspectorFrontendClientLocal@WebCore@@UAEXXZ 296 ?requestDetachWindow@InspectorFrontendClientLocal@WebCore@@UAEXXZ 297 ?sendMessageToBackend@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z 298 ?setInspectorFrontendClient@InspectorController@WebCore@@QAEXV?$PassOwnPtr@VInspectorFrontendClient@WebCore@@@WTF@@@Z 299 ?setProperty@Settings@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@0@Z 300 ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVDOMWindow@1@@Z 301 ?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UAEXXZ -
trunk/Source/autotools/symbols.filter
r128963 r129346 66 66 _ZN7WebCore14SchemeRegistry49registerURLSchemeAsBypassingContentSecurityPolicyERKN3WTF6StringE; 67 67 _ZN7WebCore14SchemeRegistry57removeURLSchemeRegisteredAsBypassingContentSecurityPolicyERKN3WTF6StringE; 68 _ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE; 68 69 _ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi; 69 70 _ZN7WebCore15toDOMStringListEPN3JSC9ExecStateENS0_7JSValueE; … … 75 76 _ZN7WebCore17InspectorCounters12counterValueENS0_11CounterTypeE; 76 77 _ZN7WebCore18HTMLContentElement6createEPNS_8DocumentE; 78 _ZN7WebCore19InspectorController15connectFrontendEPNS_24InspectorFrontendChannelE; 79 _ZN7WebCore19InspectorController18disconnectFrontendEv; 80 _ZN7WebCore19InspectorController26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE; 77 81 _ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii; 78 82 _ZN7WebCore20CachedResourceLoader31garbageCollectDocumentResourcesEv; … … 93 97 _ZN7WebCore25computeViewportAttributesENS_17ViewportArgumentsEiiifNS_7IntSizeE; 94 98 _ZN7WebCore25jsStringWithCacheSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_7PtrHashIS6_EENS3_10HashTraitsIS6_EENSC_IS9_EEEES6_; 99 _ZN7WebCore28InspectorFrontendClientLocal12moveWindowByEff; 100 _ZN7WebCore28InspectorFrontendClientLocal12openInNewTabERKN3WTF6StringE; 101 _ZN7WebCore28InspectorFrontendClientLocal14frontendLoadedEv; 102 _ZN7WebCore28InspectorFrontendClientLocal19requestAttachWindowEv; 103 _ZN7WebCore28InspectorFrontendClientLocal19requestDetachWindowEv; 104 _ZN7WebCore28InspectorFrontendClientLocal19windowObjectClearedEv; 105 _ZN7WebCore28InspectorFrontendClientLocal20sendMessageToBackendERKN3WTF6StringE; 106 _ZN7WebCore28InspectorFrontendClientLocal26changeAttachedWindowHeightEj; 107 _ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN3WTF10PassOwnPtrINS0_8SettingsEEE; 108 _ZN7WebCore28InspectorFrontendClientLocalD2Ev; 95 109 _ZN7WebCore30overrideUserPreferredLanguagesERKN3WTF6VectorINS0_6StringELj0EEE; 96 110 _ZN7WebCore30overrideUserPreferredLanguagesERKN3WTF6VectorINS0_6StringELm0EEE; 97 111 _ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeE; 98 112 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_13DOMStringListE; 113 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_9DOMWindowE; 99 114 _ZN7WebCore50restrictScaleFactorToInitialScaleIfNotUserScalableERNS_18ViewportAttributesE; 100 115 _ZN7WebCore6JSNode10putVirtualEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE; … … 106 121 _ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_13DOMStringListEEE; 107 122 _ZN7WebCore7toRangeEN3JSC7JSValueE; 123 _ZN7WebCore9DOMWindow4openERKN3WTF6StringERKNS1_12AtomicStringES4_PS0_S8_; 124 _ZN7WebCore9DOMWindow5closeEPNS_22ScriptExecutionContextE; 108 125 _ZN7WebCore9JSElement10putVirtualEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE; 109 126 _ZN7WebCore9JSElement6s_infoE; … … 183 200 _ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci; 184 201 _ZN7WebCore12PrintContext26pageSizeAndMarginsInPixelsEPNS_5FrameEiiiiiii; 202 _ZNK7WebCore9DOMWindow8documentEv; 203 _ZTVN7WebCore28InspectorFrontendClientLocal8SettingsE; 185 204 186 205 local:
Note: See TracChangeset
for help on using the changeset viewer.