RESOLVED FIXED 87935
[EFL][DRT] Add support for Web Inspector in WebKit-EFL DRT
https://bugs.webkit.org/show_bug.cgi?id=87935
Summary [EFL][DRT] Add support for Web Inspector in WebKit-EFL DRT
Seokju Kwon
Reported 2012-05-31 00:43:09 PDT
It is the first step to support for web inspector in WebKit-EFL DRT.
Attachments
Patch (13.59 KB, patch)
2012-05-31 01:30 PDT, Seokju Kwon
no flags
Patch (14.18 KB, patch)
2012-05-31 04:23 PDT, Seokju Kwon
no flags
Patch (13.30 KB, patch)
2012-07-09 21:54 PDT, Seokju Kwon
no flags
Patch (13.30 KB, patch)
2012-07-10 03:31 PDT, Seokju Kwon
no flags
Patch (13.25 KB, patch)
2012-07-10 23:41 PDT, Seokju Kwon
no flags
Patch (13.38 KB, patch)
2012-07-15 22:07 PDT, Seokju Kwon
no flags
Patch (14.00 KB, patch)
2012-07-17 22:56 PDT, Seokju Kwon
no flags
Seokju Kwon
Comment 1 2012-05-31 01:30:05 PDT
Gyuyoung Kim
Comment 2 2012-05-31 02:19:18 PDT
Comment on attachment 145017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=145017&action=review > Source/WebKit/efl/ChangeLog:8 > + It is the first step to support for Web Inspector in WebKit-EFL DRT Please write patch description for each ChangeLog more detail. In addition, put a period at the end line. > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:150 > + evas_object_focus_set(inspector, EINA_TRUE); Use true instead of EINA_TRUE. > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:590 > + Evas_Object** view = static_cast<Evas_Object **>(eventInfo); Should you need to use ** pointer in here ? > LayoutTests/ChangeLog:8 > + It is the first step to support for Web Inspector in WebKit-EFL DRT This is not proper description for this change. Re-write description. > LayoutTests/platform/efl/Skipped:300 > +#inspector Remove this all instead of comment.
Gyuyoung Kim
Comment 3 2012-05-31 04:06:09 PDT
Seokju Kwon
Comment 4 2012-05-31 04:20:20 PDT
(In reply to comment #3) > (From update of attachment 145017 [details]) > Attachment 145017 [details] did not pass efl-ews (efl): > Output: http://queues.webkit.org/results/12864187 ewk_view_web_inspector_show() and ewk_view_web_inspector_close() are implemented in another patch. (See Bug 83865) This patch depends on it.
Seokju Kwon
Comment 5 2012-05-31 04:21:13 PDT
(In reply to comment #2) > (From update of attachment 145017 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=145017&action=review > > > Source/WebKit/efl/ChangeLog:8 > > + It is the first step to support for Web Inspector in WebKit-EFL DRT > > Please write patch description for each ChangeLog more detail. In addition, put a period at the end line. Done! > > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:150 > > + evas_object_focus_set(inspector, EINA_TRUE); > > Use true instead of EINA_TRUE. Done! > > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:590 > > + Evas_Object** view = static_cast<Evas_Object **>(eventInfo); > > Should you need to use ** pointer in here ? As you know, Evas smart callback can not return a value. And Use ** pointer for returning a pointer from callback function. > > LayoutTests/ChangeLog:8 > > + It is the first step to support for Web Inspector in WebKit-EFL DRT > > This is not proper description for this change. Re-write description. Done! > > LayoutTests/platform/efl/Skipped:300 > > +#inspector > > Remove this all instead of comment. Done!
Seokju Kwon
Comment 6 2012-05-31 04:23:53 PDT
Gyuyoung Kim
Comment 7 2012-05-31 06:07:05 PDT
Seokju Kwon
Comment 8 2012-07-09 21:54:44 PDT
Gyuyoung Kim
Comment 9 2012-07-10 02:02:48 PDT
Comment on attachment 151398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151398&action=review > Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp:69 > + if (newMessage.contains("Localized string") || (newMessage.contains("Protocol Error: the message is for non-existing domain 'Profiler'"))) nit : Why do you use unneeded ( ) in second condition ? if (newMessage.contains("Localized string") || newMessage.contains("Protocol Error: the message is for non-existing domain 'Profiler'")) ? > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:770 > + // Waits until web inspector resources are loaded In code level, I don't understand what do you need to wait ? > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:773 > + ecore_main_loop_begin(); I wonder if this is meaningful? Because ecore_main_loop_begin() is already called at the beginning of layout test. http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/efl/DumpRenderTree.cpp#L257
Seokju Kwon
Comment 10 2012-07-10 03:26:48 PDT
(In reply to comment #9) > (From update of attachment 151398 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151398&action=review > > > Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp:69 > > + if (newMessage.contains("Localized string") || (newMessage.contains("Protocol Error: the message is for non-existing domain 'Profiler'"))) > > nit : Why do you use unneeded ( ) in second condition ? > > if (newMessage.contains("Localized string") || newMessage.contains("Protocol Error: the message is for non-existing domain 'Profiler'")) ? I will remove it. > > > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:770 > > + // Waits until web inspector resources are loaded > > In code level, I don't understand what do you need to wait ? > > > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:773 > > + ecore_main_loop_begin(); > > I wonder if this is meaningful? Because ecore_main_loop_begin() is already called at the beginning of layout test. > > http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/efl/DumpRenderTree.cpp#L257 Test files are using 'WebInspector' object. It is implemented in resources of web inspector(frontend). So Dumprendertree should wait until resources are loaded totally('load, finished'). If not, drt fails tests with error message below. "ReferenceError: Can't find variable: WebInspector"
Seokju Kwon
Comment 11 2012-07-10 03:31:02 PDT
Chris Dumez
Comment 12 2012-07-10 12:58:26 PDT
Comment on attachment 151428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151428&action=review > Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp:529 > +#if ENABLE(INSPECTOR) This should be at the beginning of the function, not in the middle. > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:153 > + evas_object_focus_set(inspectorView, EINA_TRUE); I believe you should use "true" here instead of EINA_TRUE, as per guidelines. > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:167 > + if (inspectorView) { You already return earlier if inspectorView is NULL so it seems this check is not needed, right? > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:770 > + // Waits until web inspector resources are loaded I don't understand why this is needed, could you explain?
Seokju Kwon
Comment 13 2012-07-10 21:50:48 PDT
(In reply to comment #12) > (From update of attachment 151428 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151428&action=review > > > Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp:529 > > +#if ENABLE(INSPECTOR) > > This should be at the beginning of the function, not in the middle. > > > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:153 > > + evas_object_focus_set(inspectorView, EINA_TRUE); > > I believe you should use "true" here instead of EINA_TRUE, as per guidelines. > > > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:167 > > + if (inspectorView) { > > You already return earlier if inspectorView is NULL so it seems this check is not needed, right? > I will fix all that you mentioned. > > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:770 > > + // Waits until web inspector resources are loaded > > I don't understand why this is needed, could you explain? Like what I said on comment #10, Drt have to wait until 'inspector.html' called web inspector is loaded totally. Because some objects in web inspector are called in test files (like LayoutTests/http/tests/inspector/inspector-test.js, LayoutTests/http/tests/inspector/console-test.js ...)
Seokju Kwon
Comment 14 2012-07-10 23:41:45 PDT
Chris Dumez
Comment 15 2012-07-11 05:36:02 PDT
Comment on attachment 151612 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151612&action=review > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:771 > + Evas_Object* inspectorView = ewk_view_web_inspector_view_get(browser->mainView()); If we really need those 3 lines, then LGTM. I was just wondering because the Qt port code seems simpler here.
Seokju Kwon
Comment 16 2012-07-12 01:58:37 PDT
(In reply to comment #15) > (From update of attachment 151612 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151612&action=review > > > Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:771 > > + Evas_Object* inspectorView = ewk_view_web_inspector_view_get(browser->mainView()); > > If we really need those 3 lines, then LGTM. I was just wondering because the Qt port code seems simpler here. Some tests are not passing without those 3 line. (Error messgae : "ReferenceError: Can't find variable: WebInspector") And I got the hint at https://bugs.webkit.org/show_bug.cgi?id=80235. Thank you for your review.
Gyuyoung Kim
Comment 17 2012-07-13 04:09:07 PDT
Comment on attachment 151398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151398&action=review >> Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:773 >> + ecore_main_loop_begin(); > > I wonder if this is meaningful? Because ecore_main_loop_begin() is already called at the beginning of layout test. > > http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/efl/DumpRenderTree.cpp#L257 I'm not clear this yet. Does inspector call ecore_main_loop_begin() / _quit() first before calling it from runTest() of DumpRenderTree.cpp ? Could you explain the reason again ? In addition, I don't like to call ecore_main_loop_begin() / _quit() from different files. If you call this in LayoutTestControllerEfl.cpp, it is good to call ecore_main_loop_quit() in here as well. I think this is good to debug.
Seokju Kwon
Comment 18 2012-07-13 22:22:32 PDT
(In reply to comment #17) > (From update of attachment 151398 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151398&action=review > > >> Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:773 > >> + ecore_main_loop_begin(); > > > > I wonder if this is meaningful? Because ecore_main_loop_begin() is already called at the beginning of layout test. > > > > http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/efl/DumpRenderTree.cpp#L257 > > I'm not clear this yet. Does inspector call ecore_main_loop_begin() / _quit() first before calling it from runTest() of DumpRenderTree.cpp ? Could you explain the reason again ? > It can't test the inspector without page(inspector.html) has finished loading on the view of inspector. I think that it can't complete loading before it loads testURL on EFL Port. So it should wait until the page has finished loading with ecore_main_loop_begin() / _quit(). > In addition, I don't like to call ecore_main_loop_begin() / _quit() from different files. If you call this in LayoutTestControllerEfl.cpp, it is good to call ecore_main_loop_quit() in here as well. I think this is good to debug. I agree with you. I will move it.
Gyuyoung Kim
Comment 19 2012-07-15 19:55:24 PDT
(In reply to comment #18) > > I'm not clear this yet. Does inspector call ecore_main_loop_begin() / _quit() first before calling it from runTest() of DumpRenderTree.cpp ? Could you explain the reason again ? > > > It can't test the inspector without page(inspector.html) has finished loading on the view of inspector. > I think that it can't complete loading before it loads testURL on EFL Port. So it should wait until the page has finished loading with ecore_main_loop_begin() / _quit(). Do you mean you need to load inspector.html first before loading testURL by page instance ? If so, I can understand this. Please update patch according to comment #17.
Seokju Kwon
Comment 20 2012-07-15 22:07:25 PDT
Seokju Kwon
Comment 21 2012-07-17 04:40:29 PDT
(In reply to comment #19) > (In reply to comment #18) > > > > I'm not clear this yet. Does inspector call ecore_main_loop_begin() / _quit() first before calling it from runTest() of DumpRenderTree.cpp ? Could you explain the reason again ? > > > > > > It can't test the inspector without page(inspector.html) has finished loading on the view of inspector. > > I think that it can't complete loading before it loads testURL on EFL Port. So it should wait until the page has finished loading with ecore_main_loop_begin() / _quit(). > > Do you mean you need to load inspector.html first before loading testURL by page instance ? If so, I can understand this. Please update patch according to comment #17. Yes. That's right. Thank you for your understanding.
Gyuyoung Kim
Comment 22 2012-07-17 18:18:34 PDT
Comment on attachment 152475 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152475&action=review Looks better than before. > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:173 > + // Waits until the page has finished loading Could you write why we need to wait for finishing page loading here ?
Seokju Kwon
Comment 23 2012-07-17 22:56:47 PDT
Gyuyoung Kim
Comment 24 2012-07-18 00:43:01 PDT
Comment on attachment 152934 [details] Patch Looks good to me now.
WebKit Review Bot
Comment 25 2012-07-18 05:50:27 PDT
Comment on attachment 152934 [details] Patch Clearing flags on attachment: 152934 Committed r122952: <http://trac.webkit.org/changeset/122952>
WebKit Review Bot
Comment 26 2012-07-18 05:50:33 PDT
All reviewed patches have been landed. Closing bug.
Dominik Röttsches (drott)
Comment 27 2012-07-19 02:18:13 PDT
Seokju, good to see this enabled. Thank you. Can you check the failing test cases on the bot? Maybe we need some new baselines here? http://build.webkit.org/results/EFL%20Linux%2064-bit%20Debug/r122954%20(2963)/results.html Please run-webkit-tests locally before unskipping a set of tests.
Seokju Kwon
Comment 28 2012-07-19 03:14:46 PDT
(In reply to comment #27) > Seokju, good to see this enabled. Thank you. > > Can you check the failing test cases on the bot? Maybe we need some new baselines here? > http://build.webkit.org/results/EFL%20Linux%2064-bit%20Debug/r122954%20(2963)/results.html > > Please run-webkit-tests locally before unskipping a set of tests. Add them to Skipped list temporarily because of the bot red. And then I will move it to TestExpectations with bug id. (https://bugs.webkit.org/show_bug.cgi?id=91624)
Note You need to log in before you can comment on or make changes to this bug.