Do not announce robot account token before account ID is available
[chromium-blink-merge.git] / chrome / test / data / window.close.html
blob333851f01956ecd7bdd0d9cd77d0635c646e9c54
1 <html>
2 <head>
3 <title>initial title</title>
4 <script>
5 var popup, popup2, popup3, popup4;
7 // window.open, window.close should be synchronous
8 function test1() {
9 popup = window.open('title1.html', 'name');
10 popup.close();
12 popup = window.open('title2.html', 'name', 'width=200,height=200');
13 popup.close();
16 // Try opening/closing a few windows.
17 function test2() {
18 openPopups();
19 closePopups();
22 function test3() {
23 openPopups();
24 setTimeout(closePopups, 0);
25 setTimeout(test4, 1);
28 function test4() {
29 openPopups();
30 setTimeout(closePopupsAndDone, 250);
33 function openPopups() {
34 popup = window.open('title1.html', 'name');
35 popup2 = window.open('title1.html', 'name2');
36 popup3 = window.open('title1.html', 'name3');
37 popup4 = window.open('title1.html', 'name4');
40 function closePopups() {
41 popup.close();
42 popup2.close();
43 popup3.close();
44 popup4.close();
47 function closePopupsAndDone() {
48 closePopups();
49 document.location = 'title2.html'
52 function startTheTest() {
53 test1();
54 test2();
55 test3();
57 </script>
58 </head>
59 <body onload="startTheTest()">
60 </body>
61 </html>