MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / has

Method has

src/test/java/org/htmlunit/javascript/host/SetTest.java:34–55  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

32 * @throws Exception if the test fails
33 */
34 @Test
35 @Alerts({"3", "true"})
36 public void has() throws Exception {
37 final String html = DOCTYPE_HTML
38 + "<html>\n"
39 + "<head>\n"
40 + "<script>\n"
41 + LOG_TITLE_FUNCTION
42 + " function test() {\n"
43 + " var myArray = ['value1', 'value2', 'value3'];\n"
44 + " var mySet = new Set(myArray);\n"
45 + " mySet.add('value1');\n"
46 + " log(mySet.size);\n"
47 + " log(mySet.has('value2'));\n"
48 + " }\n"
49 + "</script>\n"
50 + "</head>\n"
51 + "<body onload='test()'>\n"
52 + "</body></html>";
53
54 loadPageVerifyTitle2(html);
55 }
56
57 /**
58 * @throws Exception if the test fails

Callers 15

traversing.jsFile · 0.45
callbacks.jsFile · 0.45
addFunction · 0.45
jquery-1.8.1.jsFile · 0.45
addFunction · 0.45
jquery-1.9.1.jsFile · 0.45
selector.jsFile · 0.45
traversing.jsFile · 0.45
callbacks.jsFile · 0.45
callbacks.jsFile · 0.45
jquery.jsFile · 0.45
jquery-1.9.1.jsFile · 0.45

Calls 1

loadPageVerifyTitle2Method · 0.80

Tested by

no test coverage detected