Closed
Bug 806686
Opened 13 years ago
Closed 13 years ago
Port browser_privatebrowsing_geoprompt.js to the new per-window PB APIs
Categories
(Firefox :: Private Browsing, defect)
Tracking
()
RESOLVED
FIXED
Firefox 19
People
(Reporter: ehsan.akhgari, Assigned: bellindira)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
5.92 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt.js
In order to port this test, the file needs to be copied to the perwindow/ directory, and then instead of setting privateBrowsingEnabled, we need to open a new private browsing window and then run the test on that window.
Updated•13 years ago
|
Assignee: nobody → bellindira
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•13 years ago
|
||
The test is ported to PB perwindow model as I think it should be. However, the former test (the one in global directory) doesn't pass, it has this error:
JavaScript Error: "TypeError: notification is null" {file: "chrome://mochitests/content/browser/browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt.js" line: 23}
So, the new test has the same error too:
JavaScript Error: "TypeError: notification is null" {file: "chrome://mochitests/content/browser/browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_geoprompt.js" line: 25}
I tried to fix it by:
- setting an interval to wait for the notification
- importing the "resource://gre/modules/PopupNotifications.jsm" in case it wasn't loaded properly
- using executeSoon
However none of it solved the problem.
So, please let me know if you have any idea about it.
Attachment #680930 -
Flags: feedback?(ehsan)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 680930 [details] [diff] [review]
Patch v1
Review of attachment 680930 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt.js
@@ +18,2 @@
>
> + let notification = PopupNotifications.getNotification("geolocation");
First of all, you need to access PopupNotifications from aWindow.
Also, there is a whole bunch of asynchronous stuff before the notification object gets created, so you need to "wait" until that happens.
I decided that I'll fix that and land the patch. Here's the changes that I made to your patch: https://gist.github.com/4068961
Attachment #680930 -
Flags: feedback?(ehsan) → review+
Reporter | ||
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
You need to log in
before you can comment on or make changes to this bug.
Description
•