Skip to content
  • commit-queue@webkit.org's avatar
    Web Inspector: implement testing harness for pure protocol tests. · b3cd24a0
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=90675
    
    Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-09-24
    Reviewed by Yury Semikhatsky.
    
    .:
    
    Added export symbols required for Gtk+ to support the Inspector Protocol
    testing harness.
    
    * Source/autotools/symbols.filter:
    
    Source/WebCore:
    
    Implementing the testing harness as the APIs of Internals object not
    only reduced platform specific patching of DRTs but also minimized the
    the effort required to open up the new dummy inspector Frontend.
    
    The openDummyInspectorFrontend method will return the handle to newly
    created DOMWindow. This DOMWindow object can be utilized inside the test
    case to communicate using postMessage WebAPI.
    
    The newly created DOMWindow will host the protocol-test.html which
    will seed the necessary JS libraries to communicate with the
    InspectorBackend.
    
    Test: inspector-protocol/css-getSupportedCSSProperties.html
    
    * WebCore.exp.in:
    * WebCore.gypi:
    * inspector/InspectorClient.h:
    (InspectorClient):
    * testing/Internals.cpp:
    (InspectorFrontendClientDummy):
    (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy):
    (WebCore):
    (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy):
    (InspectorFrontendChannelDummy):
    (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy):
    (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy):
    (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
    (WebCore::Internals::consoleMessageArgumentCounts):
    (WebCore::Internals::openDummyInspectorFrontend):
    (WebCore::Internals::closeDummyInspectorFrontend):
    * testing/Internals.h:
    (WebCore):
    (Internals):
    * testing/Internals.idl:
    
    Source/WebKit2:
    
    Adding the export symbol definitions required on Apple Windows and WinCairo
    ports to support Inspector Protocol testing harness.
    
    * win/WebKit2.def:
    * win/WebKit2CFLite.def:
    
    LayoutTests:
    
    Adding the resources required for the dummy frontend page to load minimal
    frontend. These resources provide the mechanism to talk to the Inspector Backend.
    
    Adding the inspector-protocol folder to host the relevant test cases
    utilizing the inspector protocol test harness. Added an example test
    case for getting all supported CSS properties using the inspector
    protocol and searching for a particular property being supported.
    
    * http/tests/inspector-protocol: Added.
    * http/tests/inspector-protocol/resources: Added.
    * http/tests/inspector-protocol/resources/InspectorTest.js: Added.
    (InspectorTest.sendCommand):
    (WebInspector.dispatchMessageFromBackend):
    (InspectorTest.log):
    (InspectorTest.completeTest):
    * http/tests/inspector-protocol/resources/protocol-test.html: Added.
    * http/tests/inspector-protocol/resources/protocol-test.js: Added.
    (log):
    (closeTest):
    (runTest):
    * inspector-protocol: Added.
    * inspector-protocol/css-getSupportedCSSProperties-expected.txt: Added.
    * inspector-protocol/css-getSupportedCSSProperties.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b3cd24a0