Closed Bug 808264 Opened 12 years ago Closed 11 years ago

Intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: source editor load

Categories

(DevTools :: Console, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(firefox18 unaffected)

RESOLVED FIXED
Firefox 20
Tracking Status
firefox18 --- unaffected

People

(Reporter: philor, Assigned: Optimizer)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 2 obsolete files)

https://tbpl.mozilla.org/php/getParsedLog.php?id=16712503&tree=Cedar
Rev4 MacOSX Lion 10.7 cedar opt test mochitest-browser-chrome on 2012-11-02 18:52:40 PDT for push 3cd4d72ca67c
slave: talos-r4-lion-012

19:08:23     INFO -  TEST-START | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "Expected color but found '#0fl'.  Error in parsing value for 'color'.  Declaration dropped." {file: "http://example.com/browser/browser/devtools/webconsole/test/test-bug-782653-css-errors-2.css" line: 7}]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "Error in parsing value for 'font-weight'.  Declaration dropped." {file: "http://example.com/browser/browser/devtools/webconsole/test/test-bug-782653-css-errors-1.css" line: 8}]
19:08:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | find the location node
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Style Editor window was opened in response to clicking the location node
19:08:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Style Editor Window is defined
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | must wait for load
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | must wait for focus
19:08:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Syle Editor Chrome is defined properly while calling for [0, 7]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Editor is defined, opening the desired editor for now and checking later if it is correct
19:08:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | aEditor is defined.
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | source editor is not loaded, waiting for it.
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: OpenGL LayerManager Initialized Succesfully.
19:08:24     INFO -  Version: 2.1 NVIDIA-7.12.9
19:08:24     INFO -  Vendor: NVIDIA Corporation
19:08:24     INFO -  Renderer: NVIDIA GeForce 320M OpenGL Engine
19:08:24     INFO -  FBO Texture Target: TEXTURE_2D
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "XUL box for a element contained an inline #text child, forcing all its children to be wrapped in a block." {file: "chrome://browser/content/styleeditor.xul" line: 0}]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "XUL box for h3 element contained an inline #text child, forcing all its children to be wrapped in a block." {file: "chrome://browser/content/styleeditor.xul" line: 0}]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "XUL box for h3 element contained an inline #text child, forcing all its children to be wrapped in a block." {file: "chrome://browser/content/styleeditor.xul" line: 0}]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "chrome://browser/content/orion.js" line: 3408}]
19:08:24     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Console message: [JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "chrome://browser/content/orion.js" line: 3408}]
19:08:29  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: Wait for the source-editor to load
19:08:29  WARNING -  This is a harness error.
19:08:29     INFO -  Stack trace:
19:08:29     INFO -      JS frame :: chrome://mochitests/content/browser/browser/devtools/webconsole/test/head.js :: wait :: line 294
19:08:29     INFO -      JS frame :: chrome://mochitests/content/browser/browser/devtools/webconsole/test/head.js :: <TOP_LEVEL> :: line 304
19:08:29     INFO -      native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
Seems like this is happening even more than the previous type of failure.
@Mihai, I think removing that part of test is the only solution.

Right now, I have no clue on why aEditor.sourceEditor will not get a value anytime in 5 seconds ..
(In reply to Girish Sharma [:Optimizer] from comment #22)
> Seems like this is happening even more than the previous type of failure.
> @Mihai, I think removing that part of test is the only solution.
> 
> Right now, I have no clue on why aEditor.sourceEditor will not get a value
> anytime in 5 seconds ..

Mihai, don't suppose you saw the above? This is now one of our toporanges.
Thanks! :-)
Flags: needinfo?(mihai.sucan)
(In reply to Ed Morley (Away until 12th Nov) [:edmorley UTC+0] from comment #74)
> (In reply to Girish Sharma [:Optimizer] from comment #22)
> > Seems like this is happening even more than the previous type of failure.
> > @Mihai, I think removing that part of test is the only solution.
> > 
> > Right now, I have no clue on why aEditor.sourceEditor will not get a value
> > anytime in 5 seconds ..
> 
> Mihai, don't suppose you saw the above? This is now one of our toporanges.
> Thanks! :-)

I did and I replied to Optimizer on IRC. Waiting for his patch.

I will look into this myself if Optimizer is too busy to submit a patch.

Thanks for your ping!
Flags: needinfo?(mihai.sucan)
(In reply to Mihai Sucan [:msucan] from comment #75)
> (In reply to Ed Morley (Away until 12th Nov) [:edmorley UTC+0] from comment
> #74)
> > (In reply to Girish Sharma [:Optimizer] from comment #22)
> > > Seems like this is happening even more than the previous type of failure.
> > > @Mihai, I think removing that part of test is the only solution.
> > > 
> > > Right now, I have no clue on why aEditor.sourceEditor will not get a value
> > > anytime in 5 seconds ..
> > 
> > Mihai, don't suppose you saw the above? This is now one of our toporanges.
> > Thanks! :-)
> 
> I did and I replied to Optimizer on IRC. Waiting for his patch.
> 
> I will look into this myself if Optimizer is too busy to submit a patch.
> 
> Thanks for your ping!

Thank you for the update :-)
Flags: needinfo?(scrapmachines)
Attached patch proposed fix (obsolete) — Splinter Review
This patch changes how the test works. Did some analysis of potential failures and the style editor code.

1. querySelector for nodes was too liberal, potentially including non-css messages.
2. nodes[0] and nodes[1] were expected to be in the same order as that of the stylesheets. That may not always be true.
3. stylesheet indexes and editors order was also hard-coded.

styleEditor.sourceEditor was correct in never showing up, because we waited for the wrong styleEditor to load/show.

Try push:
https://tbpl.mozilla.org/?tree=Try&rev=2eb9127b3382
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Attachment #682049 - Flags: review?(rcampbell)
Flags: needinfo?(scrapmachines)
Thank you :-D
Comment on attachment 682049 [details] [diff] [review]
proposed fix

looks good. Land away.
Attachment #682049 - Flags: review?(rcampbell) → review+
Blocks: 812362
This failure mode seems fixed, albeit we now have bug 812362.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
I guess, I messed up big time ... :(
Anyways , I talked with Mihai and we have the solution which will fix this intermittent for good.
Whiteboard: [orange]
We should re-open this, right?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This seems to be a regression with the new devtools toolbox. Test looks fine - most-likely there's a bug in the Style Editor selectStyleSheet() method.
Summary: Intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: Wait for the source-editor to load → Intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: source editor to load
Attached patch new fix (obsolete) — Splinter Review
Possible cause: the initial selectStyleSheet(null) is executed up until it has to wait for the source editor load. The second selectStyleSheet() comes in between. Once the source editor is loaded the wrong stylesheet is selected.

I can't be sure this will actually fix the failure. I added an info() message to the test, maybe that can tell us more.

Any thoughts?
Attachment #687926 - Flags: review?(paul)
Comment on attachment 687926 [details] [diff] [review]
new fix

At least, we'll have more data.

All the styleeditor tests pass after this change, right?
Attachment #687926 - Flags: review?(paul) → review+
Landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d692897d803

Yes, all tests pass. Had a green try push.

Thank you Paul!
Summary: Intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: source editor to load → Intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Timed out while waiting for: source editor load
https://hg.mozilla.org/mozilla-central/rev/3d692897d803
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 19 → Firefox 20
Or not.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 818431
Top-orange; disabled for now:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ad42cf238d5
Whiteboard: [test disabled][leave open]
Blocks: 820315
Indeed, this is a toolbox regression. While implementing the same feature in Graphical Timeline, I noticed that Style Editor would not switch to the asked stylesheet upon the first launch using the code given below. After the first time use, if you switch to some other tool and then again execute the code, it would switch correctly. This means that Style Editor is not ready to switch as soon as the open method of styleeditorpanel returns or in other words, code execution comes inside the .then() method given below :

gDevTools.showToolbox(target, "styleeditor").then(function(toolbox) {
  toolbox.getCurrentPanel().selectStyleSheet(style, aSourceLine);
});

target is a tab target for an already opened toolbox with some other tool selected. style is a valid stylesheet for the web page.

Run the code for first time, it will select only the first style. Switch to another tool, run the code again, it will select correctly.
Depends on: 824743
Attached patch re enable testSplinter Review
Re enable tests after landing of bug 824743 and when the below try is green :

https://tbpl.mozilla.org/?tree=Try&rev=cbed78f2e6b4
Assignee: mihai.sucan → scrapmachines
Attachment #682049 - Attachment is obsolete: true
Attachment #687926 - Attachment is obsolete: true
Attachment #695784 - Flags: review?(mihai.sucan)
try is doubly green.
Comment on attachment 695784 [details] [diff] [review]
re enable test

Thank you!

Landed:
https://hg.mozilla.org/integration/fx-team/rev/3ace1b79d62b
Attachment #695784 - Flags: review?(mihai.sucan) → review+
Whiteboard: [test disabled][leave open] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/3ace1b79d62b
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This is failing only on Fedora 12x64.

iirc, tests on fedora started recently only, and that is why this failure was not seen before.

@Mihai, any idea on why source editor will not load on fedora ?
Flags: needinfo?(mihai.sucan)
I have no idea why the editor would fail to load. I doubt it fails to load. I only expect that some timing is different and the test breaks.
Flags: needinfo?(mihai.sucan)
No longer blocks: 820315
Did not happen on both Windows and Fedore for over a month. Closing.
Status: REOPENED → RESOLVED
Closed: 12 years ago11 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: