Closed Bug 859858 Opened 9 years ago Closed 9 years ago

Intermittent browser_bug664688_sandbox_update_after_navigation.js | Timed out while waiting for: window.location.href result is displayed after goBack(), browser_repeated_messages_accuracy.js | Timed out while waiting for: messages displayed


(DevTools :: Console, defect)

Windows XP
Not set


(Not tracked)

Firefox 23


(Reporter: msucan, Assigned: msucan)



(Keywords: intermittent-failure)


(1 file, 1 obsolete file)

Rev3 WINNT 5.1 fx-team debug test mochitest-browser-chrome

07:49:31 WARNING - TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_bug664688_sandbox_update_after_navigation.js | Timed out while waiting for: window.location.href result is displayed after goBack()
07:51:08 WARNING - TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_repeated_messages_accuracy.js | Timed out while waiting for: messages displayed
Attached patch proposed patch (obsolete) — Splinter Review
The new intermittent failures do not present any helpful debug output.

1. repeated_messages_accuracy.js shows no output, it simply complains of the lacking message, no errors. It looks like one of those cases where the timeout is too short, for debug builds.

2. sandbox update after nav test: shows debug output, a dump of outputNode.textContent. Again, no errors and no pointers to potential failure causes. I see "window.location.href" jsterm input, but no output, which is quite odd - I should see at least an error. *Maybe* the timeout is too short here, but given what the test checks, we may have a different failure somewhere else in the code.

To rule out timeout issues once and for all I added a new EventEmitter-based event to the web console, and I added a helper waitForMessages() function to head.js. I converted both tests to use this new approach for checking the output changes. Please let me know if this is an improvement on how newcomers can write tests for the web console output - this is the goal for the code I wrote here. If you have ideas how I can make it even easier and clearer to write this kind of tests don't hesitate to tell me.

I also added a dumpConsoles() helper which is called whenever waitForMessages() timeouts, with more detailed output to aid debugging.

Try push:

Attachment #735390 - Flags: review?(past)
Comment on attachment 735390 [details] [diff] [review]
proposed patch

Review of attachment 735390 [details] [diff] [review]:

This is nice, I like the promise-based waitForMessages much better than the waitForSuccess helper.
Attachment #735390 - Flags: review?(past) → review+
Attached patch updated patchSplinter Review
Thanks for the review.

This is the updated patch. Changes:

- the try push was green but it showed a new orange (unrelated to the patch changes) in browser_console.js. I included a fix in this patch.

- I saw log_bodies_checkbox.js also fails randomly. It seems again unrelated to the webconsole changes that landed *however* they are caused by slight timing differences, the test was always rather flimsy. I added some logging and an executeSoon() to help lower failures. Whenever they occur I hope we will get sufficient info.

Landed in inbound:
Attachment #735390 - Attachment is obsolete: true
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.