nope, this condition is here only because of the test, let's rather fix the test.

In the test, create a mock that returns a mock context (window or element) and then you can remove this condition and even assert that correct property was set (`src` if it's an iframe and `location` if it's a popup window).