Closed
Bug 692829
Opened 14 years ago
Closed 13 years ago
Display cached messages from iframes
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 25
People
(Reporter: msucan, Assigned: rcampbell)
References
Details
(Whiteboard: [webconsole])
Attachments
(1 file, 4 obsolete files)
|
9.92 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
Once bugs 611032 and 609890 land, the Web Console will only show errors and messages from the top level window of the page. We need to also display the cached messages coming from iframes.
Comment 1•14 years ago
|
||
We're doing developer tool prioritization, filter on 'brontozaur'
to ignore the spam.
Priority: -- → P3
| Reporter | ||
Updated•14 years ago
|
Component: Developer Tools → Developer Tools: Console
QA Contact: developer.tools → developer.tools.console
Comment 3•13 years ago
|
||
This feels higher than P3 to me. It's making test development annoying for me...
| Assignee | ||
Comment 4•13 years ago
|
||
yeah, we should do better than this. Taking it for investigation.
Assignee: nobody → rcampbell
Priority: P3 → P2
| Reporter | ||
Comment 5•13 years ago
|
||
Agreed.
Rob, what needs to be done here is to recursively iterate through the iframes of the top level window, get their inner window IDs, and use those to match which console API messages and script errors we get from the caches. This code lives in WebConsoleUtils.jsm, see ConsoleServiceListener/PageErrorListener and ConsoleAPIListener - they both have a getCachedMessages() method.
Thank you!
| Assignee | ||
Comment 6•13 years ago
|
||
thanks for the run-down. I'll take a look.
| Assignee | ||
Comment 7•13 years ago
|
||
| Reporter | ||
Comment 8•13 years ago
|
||
rob++! that looks good!
| Assignee | ||
Comment 9•13 years ago
|
||
tested locally, fixed failures.
Attachment #761367 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•13 years ago
|
||
Attachment #766734 -
Attachment is obsolete: true
Attachment #766792 -
Flags: review?(mihai.sucan)
| Assignee | ||
Comment 11•13 years ago
|
||
removed some extra testing gunk.
Attachment #766792 -
Attachment is obsolete: true
Attachment #766792 -
Flags: review?(mihai.sucan)
Attachment #766794 -
Flags: review?(mihai.sucan)
| Assignee | ||
Comment 12•13 years ago
|
||
| Reporter | ||
Comment 13•13 years ago
|
||
Comment on attachment 766794 [details] [diff] [review]
v1.2
Review of attachment 766794 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the patch! Patch looks good. Minor comments below.
::: browser/devtools/webconsole/test/browser_console_iframe_messages.js
@@ +2,5 @@
> + * Any copyright is dedicated to the Public Domain.
> + * http://creativecommons.org/publicdomain/zero/1.0/
> + */
> +
> +// Check that nested iframe nsIConsoleMessages are displayed in the Web Console.
Check that cached messages from nested iframes...
(caching is the important part, I think)
@@ +42,5 @@
> + ],
> + }).then(() => {
> + let text = hud.outputNode.textContent;
> + ok(text.contains("iframe 1"),
> + "nsIConsoleMessages are not displayed for iframes");
not displayed?
Also, why not put "iframe 1", "iframe 2" and "iframe 3" up in the messages array for the waitForMessages() call? Also, you can add count: 2, for "iframe 1" to make sure that message shows twice.
@@ +83,5 @@
> + "nsIConsoleMessages are not displayed for iframes in browser console");
> + ok(text.contains("iframe 2"),
> + "nsIConsoleMessages are not displayed for iframes (confirmed) in browser console");
> + is(text.match(/iframe 1/g).length, 2,
> + "nested iframe console messages not displayed in browser console");
Same as above.
::: toolkit/devtools/webconsole/WebConsoleUtils.jsm
@@ +148,3 @@
> },
>
> + getInnerWindowIDsForFrames: function WCU_getInnerWindowIDsForFrames(aWindow)
Maybe we should add a js comment for this new function.
@@ +149,5 @@
>
> + getInnerWindowIDsForFrames: function WCU_getInnerWindowIDsForFrames(aWindow)
> + {
> + if (!aWindow)
> + return [];
Do we need this? It seems to me that callers should not invoke this method if there's no |window|.
@@ +1158,4 @@
> */
> getCachedMessages: function CAL_getCachedMessages(aIncludePrivate = false)
> {
> + let ids = WebConsoleUtils.getInnerWindowIDsForFrames(this.window);
Maybe we should do this only if this.window is available.
Attachment #766794 -
Flags: review?(mihai.sucan) → review+
| Assignee | ||
Comment 14•13 years ago
|
||
alright.
| Assignee | ||
Comment 16•13 years ago
|
||
comments addressed.
Attachment #766794 -
Attachment is obsolete: true
Attachment #767195 -
Flags: review+
| Assignee | ||
Comment 17•13 years ago
|
||
Flags: in-testsuite+
Whiteboard: [webconsole] → [webconsole][fixed-in-fx-team]
Comment 18•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [webconsole][fixed-in-fx-team] → [webconsole]
Target Milestone: --- → Firefox 25
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•