Closed Bug 1283901 Opened 8 years ago Closed 8 years ago

Intermittent devtools/client/webconsole/test/browser_console_error_source_click.js | view source opened -

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox49 fixed, firefox50 fixed)

RESOLVED FIXED
Firefox 50
Tracking Status
firefox49 --- fixed
firefox50 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jsnajdr)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Blocks: 1191216
Priority: -- → P3
The screenshot shows that the console message we want to click on has scrolled out of view, because there are multiple errors logged after it. We'll need to add a call to el.scrollIntoView().
Assignee: nobody → jsnajdr
Two changes that should resolve this:
- use node.click() instead of syntesizeEvent - it doesn't require the node to be visible (scrollIntoView), which I believe is the cause of this intermittent
- just to be sure, make the check for viewSourceCalled async. I'm a bit uneasy about how the test relies on the click event to be fired synchronously
Attachment #8775997 - Flags: review?(bgrinstead)
Comment on attachment 8775997 [details] [diff] [review]
Intermittent devtools/client/webconsole/test/browser_console_error_source_click.js

Review of attachment 8775997 [details] [diff] [review]:
-----------------------------------------------------------------

::: devtools/client/webconsole/test/browser_console_error_source_click.js
@@ +54,2 @@
>    for (let result of results) {
> +    let viewSourceCalled = defer();

Click fires synchronously so I don't think we need to convert this into promises.

Secondly, there's another project underway I believe to convert defer() to new Promise().  It would require increasing the nesting (unfortunate in this case but that's the plan AFAIK)

for (let result of results) {
  let viewSource = hud.viewSource;
  yield new Promise(resolve => {
    hud.viewSource = resolve;
    // rest of code
  });
  hud.viewSource = viewSource;
}

Regardless, I really don't think we need to make this async to fix the intermittent - nothing happening in the implementation is async.
Attachment #8775997 - Flags: review?(bgrinstead)
OK, then the only change is calling node.click() instead of synthesizeMouse.
Attachment #8776013 - Flags: review?(bgrinstead)
Attachment #8775997 - Attachment is obsolete: true
Attachment #8776013 - Flags: review?(bgrinstead) → review+
Try is good, requesting checkin.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/ebdc7c4a449f
Intermittent devtools/client/webconsole/test/browser_console_error_source_click.js. r=bgrins
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ebdc7c4a449f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: