Web Inspector: implement testing harness for pure protocol tests.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 11:38:00 +0000 (11:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 11:38:00 +0000 (11:38 +0000)
commitb690ab590550d1aa4684612573d271f2a94d5703
treec274bd2a5acc31b5e7c475a7d467c6d65682a009
parent3b5826c03f0fa7bda9f9812e9adab03a0cd4eb30
Web Inspector: implement testing harness for pure protocol tests.
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: https://svn.webkit.org/repository/webkit/trunk@129346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js [new file with mode: 0644]
LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html [new file with mode: 0644]
LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js [new file with mode: 0644]
LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt [new file with mode: 0644]
LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/inspector/InspectorClient.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter