Closed
Bug 1077363
Opened 11 years ago
Closed 10 years ago
Lots of "content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead" warnings in log files
Categories
(Mozilla QA Graveyard :: Infrastructure, defect)
Mozilla QA Graveyard
Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: danisielm, Unassigned)
References
Details
Attachments
(3 files)
Once Bug 1069059 landed, we recieve a big warning in our logs that we should use isContentWindowPrivate instead of isWindowPrivate in our tests.
So maybe we have to change to that function in our BrowserWindow class, where we use it.
So what we need to do is replace one line:
https://hg.mozilla.org/qa/mozmill-tests/file/cf3e3bcdf350/firefox/lib/ui/browser.js#l32
And check if that works on all platforms for us (OSX, Linux & Windows).
I also see that this should be used only in frame scripts, but I don't know what that means, so asking Bill maybe he can clarify this. Thanks!
Flags: needinfo?(wmccloskey)
| Reporter | ||
Comment 1•11 years ago
|
||
This is the warning we get.
Comment 2•11 years ago
|
||
Our logs are getting kind of cluttered because of this warning.
Lets fix it sooner than later.
Priority: -- → P2
Updated•11 years ago
|
Mentor: andrei.eftimie
Whiteboard: [good first bug] → [lang=js][good first bug]
Updated•11 years ago
|
Attachment #8499499 -
Attachment mime type: text/x-log → text/plain
Comment 3•11 years ago
|
||
P1 and P2 shouldn't be a mentored bug. Especially if we want to get this fixed asap.
(In reply to daniel.gherasim from comment #0)
> I also see that this should be used only in frame scripts, but I don't know
> what that means, so asking Bill maybe he can clarify this. Thanks!
Our scripts are running in chrome scope, and Mozmill doesn't support e10s yet. So feedback from Bill would be kinda appreciated. Because I'm not sure how to read it. I thought we have private browsing mode only for chrome but not for each individual content window. Also setting needinfo on Tim, who originally proposed that output on bug 1062777.
Mentor: andrei.eftimie
Flags: needinfo?(ttaubert)
Whiteboard: [lang=js][good first bug]
Comment 4•11 years ago
|
||
Wait. I also see lines like:
> - if (charset && !PrivateBrowsingUtils.isWindowPrivate(aBrowser.contentWindow))
> + if (charset && !PrivateBrowsingUtils.isBrowserPrivate(aBrowser))
Isn't that the method we want? This looks to be chrome like.
If you have a XUL <browser> element, you definitely want to use isBrowserPrivate.
Flags: needinfo?(wmccloskey)
Comment 6•11 years ago
|
||
The Firefox UI supports private windows only. The platform and Firefox however do support per-tab private browsing where a private tab could be mixed with non-private tabs in a non-private window, see e.g. bug 899276. We made no promises to support it but we're trying to not break it as it's really not that hard actually.
Flags: needinfo?(ttaubert)
Comment 7•11 years ago
|
||
Andreea, can we please also get this onto the list of possible next sprints? It causes lots of log spam on CI. Thanks.
Flags: needinfo?(andreea.matei)
Comment 8•10 years ago
|
||
Adding it for the sprint that start on Monday.
Flags: needinfo?(andreea.matei)
Updated•10 years ago
|
Assignee: nobody → mihaela.velimiroviciu
Status: NEW → ASSIGNED
Whiteboard: [sprint]
Comment 9•10 years ago
|
||
That warning message appears also in the terminal (at least on Ubuntu), not only in Jenkins. I changed PrivateBrowsingUtils.isWindowPrivate to isContentWindowPrivate everywhere in our mozmill tests and library, but the message still appears when I run the tests from testPrivateBrowsing, even if the test doesn't use that function.
Could it be that that message is displayed whenever we import/use the PrivateBrowsingUtils module, no matter if we use that function (PrivateBrowsingUtils.isWindowPrivate) or not?
Comment 10•10 years ago
|
||
Mihaela, have you read my comment 4?
Comment 11•10 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #10)
> Mihaela, have you read my comment 4?
Yes, I've read it and also tried it and I get the same warning. I get the same warning even if I replace that call with just "true" - see the attached logs, when running testAboutPrivateBrowsing.js while having PrivateBrowsingUtils.isWindowPrivate replaced by "true" in the browser.js lib. The lines 37, 47 and 54 from the log correspond to the following calls:
* controller.waitForPageLoad();
* browserWindow.open({private: true, method: "callback"}, () => {
* pbWindow.controller.click(moreInfo);
So, I think the fix (if there really is one and this is not intended) needs to be done somewhere else, not in the browser.js lib.
Updated•10 years ago
|
Attachment #8528384 -
Attachment mime type: text/x-log → text/plain
Comment 12•10 years ago
|
||
I looked on mozilla-central and found out that PrivateBrowsingUtils.isWindowPrivate function is still widely used and it's called in functions that _may_ be called when running our test:
* http://dxr.mozilla.org/mozilla-central/source/browser/base/content/utilityOverlay.js#16
* gPrivateBrowsingUI.init();( http://dxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#7268) which is called by gBrowserInit.onLoad (http://dxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#956)
Comment 13•10 years ago
|
||
Henrik, any thoughts regarding comment 12?
I think it's not something we can do to get rid of that warning.
Flags: needinfo?(hskupin)
Comment 14•10 years ago
|
||
I cannot tell, but it would be good to have a testcase we could run with Mozmill and which produces this output.
Flags: needinfo?(hskupin)
Comment 15•10 years ago
|
||
The output is very easy to reproduce, running the attached test which only opens the about:privatebrowsing page and waits for it to load.
Comment 16•10 years ago
|
||
Thanks Mihaela for checking that. Can you also see this output in the browser console when opening about:privatebrowsing manually in a fresh profile?
Flags: needinfo?(mihaela.velimiroviciu)
Comment 17•10 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #16)
> Thanks Mihaela for checking that. Can you also see this output in the
> browser console when opening about:privatebrowsing manually in a fresh
> profile?
No, it doesn't appear in the browser console when opening the page manually.
Flags: needinfo?(mihaela.velimiroviciu)
Comment 18•10 years ago
|
||
Totally nothing related to our tests. It's the about private browsing page which is misbehaving here. I will move this bug over to infrastructure for just the annoyance factor in our jenkins logs. Thanks Mihaela for the minified testcase.
Assignee: mihaela.velimiroviciu → nobody
Status: ASSIGNED → NEW
Component: Mozmill Tests → Infrastructure
Priority: P2 → --
Whiteboard: [sprint]
Updated•10 years ago
|
Summary: Replace PrivateBrowsingUtils.isWindowPrivate with isContentWindowPrivate → Lots of "content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead" warnings in log files
Comment 19•10 years ago
|
||
This should be fixed now in the next Nightly build.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•