mirror of
https://github.com/servo/servo
synced 2026-05-12 18:06:32 +02:00
31 lines
799 B
HTML
31 lines
799 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/testdriver.js"></script>
|
|
<script src="/resources/testdriver-vendor.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Basic user activation test</h1>
|
|
<p>Tests that a popup is allowed with user activation.</p>
|
|
<ol id="instructions">
|
|
<li>Click anywhere in the document.
|
|
</ol></body>
|
|
<script>
|
|
let test_w_click = async_test("Popup with click");
|
|
|
|
window.addEventListener("click", () => {
|
|
test_w_click.step(() => {
|
|
let win = window.open();
|
|
assert_true(!!win);
|
|
win.close();
|
|
});
|
|
test_w_click.done();
|
|
});
|
|
|
|
test_driver.click(document.body);
|
|
</script>
|
|
</body>
|
|
</html>
|