Bug 159325

Summary: Web Inspector: Fix inspector/debugger/pause-reason.html
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, joepeck, mattbaker, msaboff, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2016-06-30 17:58:40 PDT
Summary:
This test currently fails.

Steps to Reproduce:
1. shell> run-webkit-tests --force inspector/debugger/pause-reason.html
  => Fail

Notes:
Seems to fail because we don't pause where we expect to pause due to test behavior.
Change the "pause on next statement" to not pause on inspector code, but instead pause on page code.
Comment 1 Joseph Pecoraro 2016-06-30 18:03:47 PDT
*** Bug 151893 has been marked as a duplicate of this bug. ***
Comment 2 Joseph Pecoraro 2016-06-30 18:04:22 PDT
Created attachment 282499 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2016-07-01 09:07:37 PDT
Comment on attachment 282499 [details]
[PATCH] Proposed Fix

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

> LayoutTests/inspector/debugger/pause-reason.html:33
>              test.setup();

If there are other evaluateOnPage things queued up, how do we guarantee that the pause will be on test.expression and not some other expression?
Comment 4 Joseph Pecoraro 2016-07-01 11:36:50 PDT
(In reply to comment #3)
> Comment on attachment 282499 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282499&action=review
> 
> > LayoutTests/inspector/debugger/pause-reason.html:33
> >              test.setup();
> 
> If there are other evaluateOnPage things queued up, how do we guarantee that
> the pause will be on test.expression and not some other expression?

I'm not sure there is a way we can guarantee this.

This test is testing evaluateInPage + pause on next statement. If anything happens in between the test will be broken. That said, one possible solution might be evaluateInPage where the Runtime.evaluate options include doNotPauseOnExceptionsAndMuteConsole:true to evaluate a "setTimeout(something,0)". Not sure that is much better.

What do you think?
Comment 5 WebKit Commit Bot 2016-07-02 20:32:47 PDT
Comment on attachment 282499 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 282499

Committed r202783: <http://trac.webkit.org/changeset/202783>
Comment 6 WebKit Commit Bot 2016-07-02 20:32:51 PDT
All reviewed patches have been landed.  Closing bug.