Bug 171428 - [GTK] Add automation session API
Summary: [GTK] Add automation session API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: gtk-webdriver 171431
  Show dependency treegraph
 
Reported: 2017-04-28 05:51 PDT by Carlos Garcia Campos
Modified: 2017-05-01 00:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (55.98 KB, patch)
2017-04-28 06:00 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (56.04 KB, patch)
2017-04-28 06:15 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (56.04 KB, patch)
2017-04-28 06:28 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (55.98 KB, patch)
2017-04-28 06:35 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (56.04 KB, patch)
2017-04-28 06:39 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (56.17 KB, patch)
2017-04-28 06:45 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Try to fix EWS build (56.13 KB, patch)
2017-04-28 06:56 PDT, Carlos Garcia Campos
clopez: review+
clopez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-04-28 05:51:01 PDT
Automation requires public API to ask the browser to create the web views, similar to the API for window.open(). I think it's also important that automation is disabled by default, so that applications have to enable it explicitly.
Comment 1 Carlos Garcia Campos 2017-04-28 06:00:29 PDT
Created attachment 308520 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-04-28 06:13:01 PDT
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp: In lambda function:
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:67:83: error: no matching function for call to 'AutomationTest::setTarget(guint64&, <brace-enclosed initializer list>)'
                         test->setTarget(connectionID, { targetID, name, isPaired });
                                                                                   ^
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:67:83: note: candidate is:
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAutomatiFailed to run "['Tools/Scripts/build-webkit', '--release', '--gtk', '--update-gtk', '--makeargs="-j48"']" exit_code: 1

I guess it's once again the GCC version or something because it builds locally, I'll try to work around it :-/
Comment 3 Carlos Garcia Campos 2017-04-28 06:15:36 PDT
Created attachment 308521 [details]
Try to fix EWS build
Comment 4 Carlos Garcia Campos 2017-04-28 06:28:14 PDT
Created attachment 308523 [details]
Try to fix EWS build
Comment 5 Carlos Garcia Campos 2017-04-28 06:35:08 PDT
Created attachment 308524 [details]
Try to fix EWS build
Comment 6 Carlos Garcia Campos 2017-04-28 06:39:02 PDT
Created attachment 308525 [details]
Try to fix EWS build

I hate GCC
Comment 7 Carlos Garcia Campos 2017-04-28 06:45:11 PDT
Created attachment 308526 [details]
Try to fix EWS build

Let's forget about the { } and go back to the old fashion way.
Comment 8 Carlos Garcia Campos 2017-04-28 06:56:01 PDT
Now it complains about a different thing, and of course I have no idea what the problem is :-(
Comment 9 Carlos Garcia Campos 2017-04-28 06:56:43 PDT
Created attachment 308527 [details]
Try to fix EWS build
Comment 10 Carlos Alberto Lopez Perez 2017-04-28 07:23:02 PDT
Comment on attachment 308527 [details]
Try to fix EWS build

I have tested it, the tests work fine for me. The code also looks good to me.
Another reviewer should also approve this before landing giving that this adds new API.
(Setting cq- due to that: needs second review)
Comment 11 Michael Catanzaro 2017-04-28 09:37:30 PDT
I didn't look at the code, but the API seems fine to me.
Comment 12 BJ Burg 2017-04-28 10:00:02 PDT
Comment on attachment 308527 [details]
Try to fix EWS build

Looks awesome!
Comment 13 Carlos Garcia Campos 2017-05-01 00:04:08 PDT
Committed r216006: <http://trac.webkit.org/changeset/216006>