wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Add ability to test with popup blocker enabled

Open zcorpan opened this issue 9 years ago • 10 comments

See https://github.com/whatwg/html/pull/1854

It would be good to be able to somehow test the behavior of window.open with the popup blocker enabled (not just for the return value, but also to test when the popup is being blocked, for cases that don't need to be manual).

zcorpan avatar Oct 04 '16 11:10 zcorpan

This is also a problem for https://github.com/whatwg/html/issues/2616.

cc @jugglinmike

annevk avatar May 03 '17 10:05 annevk

I'm labeling this as backlog (the lowest priority) because it seems like this will not affect any whole features, but rather a handful of cases spread around the platform. @JKereliuk, this might require some WebDriver APIs. If you're tracking feature requests somewhere, can you add this there?

foolip avatar Oct 04 '17 09:10 foolip

@foolip +1 :)

kereliuk avatar Oct 04 '17 13:10 kereliuk

Are there any existing manual tests that need this?

kereliuk avatar Nov 20 '17 22:11 kereliuk

There's examples linked in the issues above that could easily be turned into tests.

annevk avatar Nov 21 '17 08:11 annevk

@jstenback ran into this with https://wpt.fyi/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html, which fails on Edge and Safari because of the popup blocker, at least it seems like that in my manual testing.

@kereliuk, do you know if ChromeDriver implicitly disables the popup blocker, or why this passes in Chrome?

foolip avatar Jan 11 '18 16:01 foolip

You need to disable the popup blocker to use web-platform-tests. That's why this issue is asking for the opposite.

annevk avatar Jan 11 '18 18:01 annevk

This is blocking tests for User Activation v2 consumption behavior: disabled popup blocker means activation consumption is invisible to the page.

mustaqahmed avatar Jul 26 '18 18:07 mustaqahmed

Thanks for reporting @mustaqahmed. Multiple teams are now using https://web-platform-tests.org/writing-tests/testdriver-tutorial.html to add their own testing APIs end-to-end, with help from @kereliuk. As you're implementing User Activation v2, is this an issue you'd consider owning? I believe the WebDriver extension API, if that makes sense, would have to go in either HTML or a standalone extension spec.

How are you testing this internally, in LayoutTests? Is there an internals.something() API that you use?

foolip avatar Aug 08 '18 13:08 foolip

This is also a problem for full test coverage for https://github.com/whatwg/html/pull/10547

zcorpan avatar Aug 05 '24 13:08 zcorpan