1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.javascript.host.media;
16
17 import org.htmlunit.WebDriverTestCase;
18 import org.htmlunit.junit.annotation.Alerts;
19 import org.junit.jupiter.api.Test;
20
21
22
23
24
25
26 public class PeriodicSyncManagerTest extends WebDriverTestCase {
27
28
29
30
31 @Test
32 @Alerts(DEFAULT = "false",
33 CHROME = "true",
34 EDGE = "true")
35 public void inWindow() throws Exception {
36 final String html = DOCTYPE_HTML
37 + "<html>\n"
38 + "<head>\n"
39 + " <script>\n"
40 + LOG_TITLE_FUNCTION
41 + " function test() {\n"
42 + " log('PeriodicSyncManager' in window);\n"
43 + " }\n"
44 + " </script>\n"
45 + "</head>\n"
46 + "<body onload='test()'>\n"
47 + "</body>\n"
48 + "</html>";
49
50 loadPageVerifyTitle2(html);
51 }
52 }