Bug 1419960 - Make the noopener window feature not affect whether other window features are enabled | Anny G's blog

Bug 1419960 - Make the noopener window feature not affect whether other window features are enabled

Written on Jul 9, 2018

Monday July 9

9:17am

I’m trying to create tests for this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1419960 and I am not sure how to test that executing window.open(url, "_blank", "noopener") opens a new tab. Another intern mentioned I could look in browser* test APIs.

I found the following things useful

2:24pm

Somehow, when I use withNewTab, while opening an html page with the above code, the browser only shows that we have 2 tabs open. Need to figure out another way to open the page. There is another property getVisibleTabs on browser, so perhaps I could try that.

3:13pm

Realized that withNewTab takes a task and runs it while the tab is loading. I need the task to run after the tab has loaded. Will look into openNewForegroundTab

4:00pm

Using openNewForegroundTab now. Spent the last hour trying to figure out how to pass a message from the newly opened tab to the ‘noopener test’ tab, only to realize I don’t need to pass a message because I can simply wait on the condition. Things are finally working!