Closed Bug 728830 Opened 8 years ago Closed 7 years ago

Intermittent browser_dbg_update-editor-mode.js | Found the expected editor mode. - Got js, expected html | The correct script was loaded initially. | The first script is displayed. | Test timed out

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 14

People

(Reporter: emorley, Assigned: msucan)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Rev3 WINNT 6.1 mozilla-inbound opt test mochitest-other
https://hg.mozilla.org/integration/mozilla-inbound/rev/d743384fb011

https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=d743384fb011
https://tbpl.mozilla.org/php/getParsedLog.php?id=9451535&tree=Mozilla-Inbound#error0

{
TEST-PASS | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | Should only be getting stack frames while paused.
TEST-PASS | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | Found the expected number of scripts.
TEST-PASS | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | Found the expected editor mode.
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | The correct script was loaded initially.
Stack trace:
    JS frame :: chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js :: <TOP_LEVEL> :: line 47

TEST-PASS | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | The second script is no longer displayed.
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | The first script is displayed.
Stack trace:
    JS frame :: chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js :: testSwitchPaused :: line 69
    JS frame :: chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js :: onChange :: line 53
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 157
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 3691
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 7596
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 7425
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 157
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 1763
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 1911
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 7582
    JS frame :: chrome://browser/content/orion.js :: <TOP_LEVEL> :: line 4262
    JS frame :: resource:///modules/source-editor-orion.jsm :: SE_setText :: line 708
    JS frame :: chrome://browser/content/debugger.js :: SS_showScript :: line 548
    JS frame :: chrome://browser/content/debugger.js :: SS_onChange :: line 490

TEST-PASS | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | Found the expected editor mode.
DBG-SERVER: Got: {
  "to": "conn25.context4",
  "type": "resume"
}
DBG-SERVER: Got: {
  "from": "conn25.context4",
  "type": "resumed"
}
TEST-INFO | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | Console message: [JavaScript Warning: "XUL box for div element contained an inline #text child, forcing all its children to be wrapped in a block." {file: "chrome://browser/content/debugger.xul" line: 0}]
INFO TEST-END | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js | finished in 518ms
}
Blocks: 728926
Summary: Intermittent browser_dbg_update-editor-mode.js | The correct script was loaded initially. | The first script is displayed. → Intermittent browser_dbg_update-editor-mode.js | Found the expected editor mode. - Got js, expected html | The correct script was loaded initially. | The first script is displayed.
Summary: Intermittent browser_dbg_update-editor-mode.js | Found the expected editor mode. - Got js, expected html | The correct script was loaded initially. | The first script is displayed. → Intermittent browser_dbg_update-editor-mode.js | Found the expected editor mode. - Got js, expected html | The correct script was loaded initially. | The first script is displayed. | Test timed out
Priority: -- → P3
Assignee: nobody → past
Status: NEW → ASSIGNED
Priority: P3 → P2
Attached patch proposed fix (obsolete) — Splinter Review
Proposed fix. Like in bug 734641.

Reasoning (something I should've wrote this for that patch): these tests wait for the framesadded event. The debugger UI also waits for the same event. When frames are added UI changes are made (obviously) to add the frames. However, these are unrelated to scripts being added into the view, and unrelated to any script being actually shown to the user. The first script that is loaded is put into the editor, only if the editor is empty (so that only happens once). When the stack frames are received the youngest frame is selected. If the currently visible script is not the same script as that of the stack frame, that becomes selected and the editor is asked to move to the stack frame location (line number). The action to show a script is async: the script may have not be available yet, so the script loads from the cache via a custom DOM event.

These tests wait for framesadded because they are interested when the debugger is paused, when the frames are available. We do not wait for scriptsadded because those are not directly relevant to what we want to test. We also did not have an event for when a script was shown.

In bug 734641 I added an event for ScriptShown that tells which script is shown. Also I added a way to pass the "showOptions" to the async loader because in the async case in selectFrame() the actual code that tries to change the editor view location will not work as expected: the script is not loaded yet.

Tests need to wait for both separate events before they can proceed - otherwise we'd have to not check stuff in the editor if we want to only rely on the framesadded event. Similarly, we can't solely rely on the new ScriptShown event due to the way scriptsadded works. I believe that we should not make the framesadded/ScriptShown events dependent on each other. I would say it's a problem in our tests that we wait for some event and try to access information/data from other places that happen to be updated at later points in time.

I hope this info helps. Looking forward to your review! Thank you!

Try push:
https://tbpl.mozilla.org/?tree=Try&rev=cad5cb7adb5a
(no results yet)
Attachment #612267 - Flags: review?(rcampbell)
Updated the patch to include fixes for bug 740775.

The try results no longer showed the failures of this bug, but the test still failed due to the aforementioned bug.

Another try push:
https://tbpl.mozilla.org/?tree=Try&rev=0120444ca92b

I hope the test is now entirely fixed.
Attachment #612267 - Attachment is obsolete: true
Attachment #612497 - Flags: review?(rcampbell)
Attachment #612267 - Flags: review?(rcampbell)
Comment on attachment 612497 [details] [diff] [review]
[in-fx-team] more fixes

solid reasoning.

I will name you ORANGE KILLER!
Attachment #612497 - Flags: review?(rcampbell) → review+
Thank you!


(this is landable. green results on multiple try runs)
Assignee: past → mihai.sucan
Whiteboard: [orange] → [orange][land-in-fx-team]
Blocks: 740775
No longer blocks: 728926
Comment on attachment 612497 [details] [diff] [review]
[in-fx-team] more fixes

Landed:
https://hg.mozilla.org/integration/fx-team/rev/9f82d9ab3f1f
Attachment #612497 - Attachment description: more fixes → [in-fx-team] more fixes
Whiteboard: [orange][land-in-fx-team] → [orange][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/9f82d9ab3f1f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
Seems not fixed, yet :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [orange][fixed-in-fx-team] → [orange]
FILTER ON PUMPKINS.
Status: REOPENED → RESOLVED
Closed: 8 years ago7 years ago
Resolution: --- → FIXED
Whiteboard: [orange]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.