Closed Bug 806719 Opened 7 years ago Closed 7 years ago
_cmd _screenshot .js to the new per-tab PB APIs
http://mxr.mozilla.org/mozilla-central/source/browser/devtools/commandline/test/browser_cmd_screenshot.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.
This caused a test failure: https://tbpl.mozilla.org/php/getParsedLog.php?id=17288140&tree=Mozilla-Inbound&full=1 so I backed it out: https://hg.mozilla.org/integration/mozilla-inbound/rev/a852c3f0e2fd Can you please attach a new version of the patch which fixes this? Thanks!
The issue was that on head.js I added the following line: Services.scriptloader.loadSubScript(testDir + "/helpers_perwindowpb.js", this); and helpers_perwindowpb.js was only added to MOCHITEST_BROWSER_FILES ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING. So, this fix adds the file whether MOZ_PER_WINDOW_PRIVATE_BROWSING is defined or not. Other solution is adding the script to head.js only if MOZ_PER_WINDOW_PRIVATE_BROWSING is defined. However, I am not sure how to preprocess the head.js on the makefile. BTW, This patch contains a minor fix in browser_cmd_screenshot_perwindowpb.js.
Comment on attachment 684736 [details] [diff] [review] Ported testcase v1 Nice catch!
Attachment #684736 - Flags: review?(ehsan) → review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
You need to log in before you can comment on or make changes to this bug.