Bug 40774 - Web Inspector: implement layout tests for debugger
Summary: Web Inspector: implement layout tests for debugger
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: Yury Semikhatsky
URL:
Keywords:
Depends on: 41147
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-17 07:08 PDT by Yury Semikhatsky
Modified: 2010-06-24 04:20 PDT (History)
11 users (show)

See Also:


Attachments
Patch (13.44 KB, patch)
2010-06-21 09:30 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (13.13 KB, patch)
2010-06-22 08:35 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2010-06-17 07:08:00 PDT
Implement layout tests for JS debugger in Web Inspector.
Comment 1 Yury Semikhatsky 2010-06-21 09:30:31 PDT
Created attachment 59258 [details]
Patch
Comment 2 Pavel Feldman 2010-06-22 01:10:21 PDT
Comment on attachment 59258 [details]
Patch

LayoutTests/http/tests/inspector/inspector-test.js:35
 +          if (window.layoutTestController) {
You don't need this change, right? Same here. We should rely on DRT. Is there a reason we can't trust it?

LayoutTests/http/tests/inspector/inspector-test.js:107
 +      var toolbar = document.getElementById("toolbar");
What is wrong with assigning to the current panel? (that is what IC is doing by means of WebInspector.show*Panel calls.

WebCore/platform/mac/EventLoopMac.mm:35
 +      NSTimeInterval interval = [[NSDate date] timeIntervalSinceReferenceDate];
I am hesitant getting into this code / reviewing it in connection with inspector tests. Why did you change this? Does it work on all other platforms? (You are only changing the mac's platform). What non-inspector flows will it affect? r- until this is cleared properly.
Comment 3 Yury Semikhatsky 2010-06-22 06:05:26 PDT
(In reply to comment #2)
> (From update of attachment 59258 [details])
> LayoutTests/http/tests/inspector/inspector-test.js:35
>  +          if (window.layoutTestController) {
> You don't need this change, right? Same here. We should rely on DRT. Is there a reason we can't trust it?
> 
This is needed to ensure that debugger is resumed after test is completed.

> LayoutTests/http/tests/inspector/inspector-test.js:107
>  +      var toolbar = document.getElementById("toolbar");
> What is wrong with assigning to the current panel? (that is what IC is doing by means of WebInspector.show*Panel calls.
> 
Will change this.

> WebCore/platform/mac/EventLoopMac.mm:35
>  +      NSTimeInterval interval = [[NSDate date] timeIntervalSinceReferenceDate];
> I am hesitant getting into this code / reviewing it in connection with inspector tests. Why did you change this? Does it work on all other platforms? (You are only changing the mac's platform). What non-inspector flows will it affect? r- until this is cleared properly.
As I wrote in ChangeLog there may be no events to be processed in the EventLoop if script execution is paused in DRT. If there were no timeout the test would hang since ScriptDebugServer would never leave the event loop and wouldn't have a chance to check if the execution was resumed.
Comment 4 Yury Semikhatsky 2010-06-22 08:35:39 PDT
Created attachment 59372 [details]
Patch
Comment 5 Yury Semikhatsky 2010-06-22 09:29:04 PDT
> WebCore/platform/mac/EventLoopMac.mm:35
>  +      NSTimeInterval interval = [[NSDate date] timeIntervalSinceReferenceDate];
> I am hesitant getting into this code / reviewing it in connection with inspector tests. Why did you change this? Does it work on all other platforms? (You are only changing the mac's platform). What non-inspector flows will it affect? r- until this is cleared properly.
Would be nice if the author of the code look at this change. Tim, could you review this stuff?
Comment 6 Pavel Feldman 2010-06-23 14:47:38 PDT
Comment on attachment 59372 [details]
Patch

WebCore/platform/mac/EventLoopMac.mm:36
 +      interval += 0.05;
From the IRC: Timothy is suggesting longer timeout (1s). Other than that, he is fine.
Comment 7 Pavel Feldman 2010-06-23 14:48:48 PDT
> From the IRC: Timothy is suggesting longer timeout (1s). Other than that, he is fine.
... with the change :)
Comment 8 Yury Semikhatsky 2010-06-24 01:51:14 PDT
(In reply to comment #6)
> (From update of attachment 59372 [details])
> WebCore/platform/mac/EventLoopMac.mm:36
>  +      interval += 0.05;
> From the IRC: Timothy is suggesting longer timeout (1s). Other than that, he is fine.

1s timeout would slow down each pause/continue pair for 1s. So I'd rather continue with a shorter timeout.
Comment 9 Yury Semikhatsky 2010-06-24 02:01:35 PDT
Comment on attachment 59372 [details]
Patch

Clearing flags on attachment: 59372

Committed r61749: <http://trac.webkit.org/changeset/61749>
Comment 10 Yury Semikhatsky 2010-06-24 02:01:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 WebKit Review Bot 2010-06-24 02:35:18 PDT
http://trac.webkit.org/changeset/61749 might have broken Qt Linux Release