[GTK] Use custom JavaScript instead of DBus to implement WebProcess tests
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Nov 2014 14:29:26 +0000 (14:29 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Nov 2014 14:29:26 +0000 (14:29 +0000)
commit70952117d1e5047253211f59bca1f14793832a1a
tree27e58b5cf9e6423747c87c9e5ebdd8b8cc2a1020
parent90c9e01237327bc48599687b259750b815959435
[GTK] Use custom JavaScript instead of DBus to implement WebProcess tests
https://bugs.webkit.org/show_bug.cgi?id=138834

Reviewed by Sergio Villar Senin.

It makes everyting simpler and the tests run faster too, since we
don't need to spawn the private bus and wait until the DBus name
is registered. The web extension registers a new JavaSCript class
with a status method to run the tests, similar to the DBus
method. In the UI process side, tests use webkit_web_view_run_java_script()
instead of sending a DBus message.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeFilterTest.cpp:
(WebKitDOMNodeFilterTest::create):
(WebKitDOMNodeFilterTest::testTreeWalker):
(WebKitDOMNodeFilterTest::testNodeIterator):
(WebKitDOMNodeFilterTest::webPageFromArgs): Deleted.
(WebKitDOMNodeFilterTest::runTest): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::create):
(WebKitDOMNodeTest::testHierarchyNavigation):
(WebKitDOMNodeTest::testInsertion):
(WebKitDOMNodeTest::testTagNames):
(WebKitDOMNodeTest::webPageFromArgs): Deleted.
(WebKitDOMNodeTest::runTest): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMXPathNSResolverTest.cpp:
(WebKitDOMXPathNSResolverTest::create):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverNative):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverCustom):
(WebKitDOMXPathNSResolverTest::webPageFromArgs): Deleted.
(WebKitDOMXPathNSResolverTest::runTest): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp:
(WebKitFrameTest::create):
(WebKitFrameTest::testMainFrame):
(WebKitFrameTest::testURI):
(WebKitFrameTest::testJavaScriptContext):
(WebKitFrameTest::webPageFromArgs): Deleted.
(WebKitFrameTest::runTest): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp:
(testWebKitDOMNodeHierarchyNavigation):
(testWebKitDOMNodeInsertion):
(testWebKitDOMNodeTagNames):
(beforeAll):
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNodeFilter.cpp:
(runTest):
(beforeAll):
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMXPathNSResolver.cpp:
(testWebKitDOMXPathNSResolverNative):
(testWebKitDOMXPathNSResolverCustom):
(beforeAll):
(afterAll):
(runTest): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp:
(webkitFrameTestRun):
(beforeAll):
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp:
(testsMap):
(WebProcessTest::add):
(WebProcessTest::create):
(runTest):
(windowObjectClearedCallback):
(webkit_web_extension_initialize):
(methodCallCallback): Deleted.
(webkit_web_extension_initialize_with_user_data): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h:
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp: Removed.
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h: Removed.
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(WebViewTest::runWebProcessTest):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeFilterTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMXPathNSResolverTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNodeFilter.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMXPathNSResolver.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp [deleted file]
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h [deleted file]
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h