Closed Bug 806720 Opened 7 years ago Closed 7 years ago

Port browser_styleeditor_private.js to the new per-tab PB APIs

Categories

(Firefox :: Private Browsing, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 19

People

(Reporter: ehsan, Assigned: marioalv)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

http://mxr.mozilla.org/mozilla-central/source/browser/devtools/styleeditor/test/browser_styleeditor_private.js

In order to port this test, the file needs to be copied to the same directory (perhaps with "_perwindowpb" appended to its file name), and then instead of setting privateBrowsingEnabled, we need to open a new private browsing window and then run the test on that window.  Note that the original test should only be added to the list of test files in Makefile.in ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING, and the new test file should be added to the list with the reverse condition.
Assignee: nobody → marioalv.mozilla
Status: NEW → ASSIGNED
Comment on attachment 680851 [details] [diff] [review]
Patch to migrate the test to the new per window private mode

Review of attachment 680851 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good in general, but I have a few comments below.

::: browser/devtools/styleeditor/test/Makefile.in
@@ +47,5 @@
>  
> +
> +ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
> +_BROWSER_TEST_FILES += \
> +                 browser_styleeditor_private.js \

You need to remove this file from the other place it is mentioned in this file.

::: browser/devtools/styleeditor/test/browser_styleeditor_private_perwindowpb.js
@@ +1,1 @@
> +/* This Source Code Form is subject to the terms of the Mozilla Public

Please use hg cp to copy these test files before modifying them, to make it obvious what has changed in the test.

@@ +4,5 @@
> +
> +// This test makes sure that the style editor does not store any
> +// content CSS files in the permanent cache when opened from PB mode.
> +
> +function checkDiskCacheFor(host) {

It might make sense to move this function into head.js and share it between the two tests.
Attachment #680851 - Flags: review?(ehsan)
Thanks for your review.
I've made the changes you suggested.
Please let me know if everything's OK.
Attachment #680851 - Attachment is obsolete: true
Attachment #680897 - Flags: review?(ehsan)
Comment on attachment 680897 [details] [diff] [review]
Patch to migrate the test to the new per window private mode

Review of attachment 680897 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great, thanks!
Attachment #680897 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/400d7b156d2f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
This test times out on the Birch branch:

https://tbpl.mozilla.org/php/getParsedLog.php?id=17530745&tree=Birch#error2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I think this patch might fix this test failure: https://hg.mozilla.org/mozilla-central/rev/f77bad5734a3
Indeed, that did the trick!
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Nice.
Thank you very much for the fix.
You need to log in before you can comment on or make changes to this bug.