[GTK] Expose user script messages to GObject DOM bindings
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 12:30:38 +0000 (12:30 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 12:30:38 +0000 (12:30 +0000)
commitc2c9ac3128a80ec41c87223dcc0064e10d9a020b
tree154c520aab3ae9730c8f2c590cc4721800abd4bd
parent81439c54259576c777e1d38a5865957ff2a1b55d
[GTK] Expose user script messages to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138411

Reviewed by Philippe Normand.

Source/WebCore:

* PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
installed headers and make a symlink for it in the DerivedSources dir.
* bindings/gobject/WebKitDOMCustomUnstable.h: Added.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_get_webkit_namespace):
(webkit_dom_user_message_handlers_namespace_get_handler):
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Helper function to check if the given
class has custom unstable API.
(WriteData): Include WebKitDOMCustomUnstable.h header if the class
has API defined there.

Tools:

Add a test case to check that user script messages sent using the
DOM bindings API are also received in the UI process.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
(UserScriptMessageTest::waitUntilMessageReceived):
(UserScriptMessageTest::postMessageAndWaitUntilReceived):
(testUserContentManagerScriptMessageFromDOMBindings):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp
Source/WebCore/bindings/gobject/WebKitDOMCustomUnstable.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp