Bug 74208 - Web Inspector: [Chromium] add support to inspector test suite to fetch test execution results from console
Summary: Web Inspector: [Chromium] add support to inspector test suite to fetch test e...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 13:20 PST by Andrey Kosyakov
Modified: 2011-12-15 05:26 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2011-12-09 13:22 PST, Andrey Kosyakov
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-12-09 13:20:28 PST
Extension tests run in a context of their own, so to interface them with inspector test suite, we just log to console and pick test execution results from console in the front-end context.
Comment 1 Andrey Kosyakov 2011-12-09 13:22:37 PST
Created attachment 118622 [details]
Patch
Comment 2 Pavel Feldman 2011-12-11 09:39:20 PST
Comment on attachment 118622 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118622&action=review

> Source/WebKit/chromium/src/js/Tests.js:561
> +TestSuite.prototype.testWaitForResultsInConsole = function()

Could you elaborate on how you intend to use this?
Comment 3 Pavel Feldman 2011-12-11 09:44:36 PST
Comment on attachment 118622 [details]
Patch

Clearing the r? while waiting for the clarification to remote it from the dashboard.
Comment 4 Andrey Kosyakov 2011-12-11 10:10:11 PST
(In reply to comment #3)
> (From update of attachment 118622 [details])
> Clearing the r? while waiting for the clarification to remote it from the dashboard.

See http://codereview.chromium.org/8899008/ for context. Basically, we use console as a poor man's IPC here: the test actually runs asynchronously in another context and reports the results to the inspector console.
Comment 5 Yury Semikhatsky 2011-12-12 07:14:29 PST
Comment on attachment 118622 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118622&action=review

>> Source/WebKit/chromium/src/js/Tests.js:561
>> +TestSuite.prototype.testWaitForResultsInConsole = function()
> 
> Could you elaborate on how you intend to use this?

Could you pick a more specific name for the test method?

> Source/WebKit/chromium/src/js/Tests.js:568
> +        else if (/^FAIL/.test(text))

If there are several failures you may want to print all of them.
Comment 6 Pavel Feldman 2011-12-12 07:19:08 PST
(In reply to comment #5)
> (From update of attachment 118622 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118622&action=review
> 
> >> Source/WebKit/chromium/src/js/Tests.js:561
> >> +TestSuite.prototype.testWaitForResultsInConsole = function()
> > 
> > Could you elaborate on how you intend to use this?
> 
> Could you pick a more specific name for the test method?

Sounds like this is not a method, but rather is a part of the harness. It would be great to get a bigger picture in the ChangeLog...

> 
> > Source/WebKit/chromium/src/js/Tests.js:568
> > +        else if (/^FAIL/.test(text))
> 
> If there are several failures you may want to print all of them.
Comment 7 Andrey Kosyakov 2011-12-15 05:25:28 PST
renamed to TestSuite.prototype.waitForTestResultsInConsole, added a ChangeLog with a reference to usage.
Comment 8 Andrey Kosyakov 2011-12-15 05:26:39 PST
Committed r102928: <http://trac.webkit.org/changeset/102928>