qutebrowser/tests/end2end/data/javascript/window_open.html
Florian Bruhin 91ca7d0911 tests: Rename close function in window_open.html
Naming it close() conflicts with the global JS close()
2018-03-25 19:39:34 +02:00

41 lines
892 B
HTML

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var my_window;
function open_modal() {
window.open('about:blank', 'window', 'modal');
}
function open_normal() {
my_window = window.open('about:blank', 'my_window');
}
function open_invalid() {
window.open('', 'my_window');
}
function close_normal() {
my_window.close();
}
function close_twice() {
my_window.close();
my_window.close();
}
</script>
</head>
<body>
<button onclick="open_normal()" id="open-normal">normal</button>
<button onclick="open_modal()" id="open-modal">modal</button>
<button onclick="open_invalid()" id="open-invalid">invalid/no URL</button>
<button onclick="close_normal()" id="close-normal">close</button>
<button onclick="close_twice()" id="close-twice">close twice (issue 906)</button>
</body>
</html>