chromium/third_party/blink/web_tests/fast/events/popup-blocking-timers4.html

<!DOCTYPE html>
<head>
    <script src="../../resources/js-test.js"></script>
    <script src="../../resources/testdriver.js"></script>
    <script src="../../resources/testdriver-vendor.js"></script>
    <script>
        var newWindow;

        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        function clickHandler() {
            setTimeout(function() {
                setTimeout(function() {
                    newWindow = window.open("about:blank");
                    self.focus();
                    debug("Test calling window.open() in a nested call to setTimeout(). A popup should be allowed.")
                    shouldBeNonNull("newWindow");
                    if (window.testRunner)
                        testRunner.notifyDone();
                }, 0);
            }, 300);
        }

        function clickButton() {
            var button = document.getElementById("test");
            test_driver.click(button);
        }
    </script>
</head>
<body onload="clickButton()">
    <button id="test" onclick="clickHandler()">Click Here</button>
    <div id="console"></div>
</body>