Closed Bug 1269533 Opened 9 years ago Closed 9 years ago

sdk/windows browserWindows list broken after javascript:window.open()

Categories

(Firefox :: Untriaged, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: ultr, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build ID: 20160426233433 Steps to reproduce: 0. Install attached BrowserWindowsTest extension for the debug shortcut Ctrl+Alt+D and start a clean session of Firefox, one window open. (Or you can run it with "jpm run -b /usr/bin/firefox"). 1. Press Ctrl+Alt+D and observe the Debug console [1] 2. Press Ctrl+N to open a new browser window 3. Press Ctrl+Alt+D and observe the Debug console [2] 4. Enter "javascript:window.open('about:blank');" into the address bar and press Enter. 5. Press Ctrl+Alt+D and observe the Debug console [3] [A] one browser window open: console.log: browserwindowstest: windows.browserWindows.length = 1 console.log: browserwindowstest: constructor {"0":{}} [B] two browser windows open: console.log: browserwindowstest: windows.browserWindows.length = 2 console.log: browserwindowstest: constructor {"0":{},"1":{}} [C] three (!) browser windows open: console.log: browserwindowstest: windows.browserWindows.length = 2 console.log: browserwindowstest: constructor {"0":{},"1":{}} You can continue opening browser windows with Ctrl+N and window.open() with the same results - those opened with Ctrl+N are added to sdk/windows browserWindows list, and those opened with window.open() are not. Actual results: sdk/windows browserWindows list does not contain BrowserWindows opened with window.open(). However these windows are visually no different from BrowserWindows opened with Ctrl+N. Also no 'open' event is triggered for sdk/windows browserWindows after window.open(). So there is no way to list all opened BrowserWindows. This renders that SDK API *useless* for performing operations on browser windows from within an addon. Expected results: sdk/windows browserWindows should contain *ALL* BrowserWindows opened, both with Ctrl+N and with window.open().
Depends on: 1145260
Hi, I've installed your addon in the hopes of reproducing this, but the Ctrl+Alt+D shortcut does not do anything. Also I don't see anything like "console.log: browserwindowstest: windows.browserWindows.length = 1" in the Browser Console(Ctrl+Shift+J). Do I need to do additional setup to get this to work as you are describing it? Thanks, Cipri
Flags: needinfo?(ultr)
Marking this as Resolved: Incomplete due to the lack of response from the reporter. If anyone can still reproduce it on latest versions, feel free to reopen the issue and provide more information.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(ultr)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: