@throws Exception if the test fails
()
| 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 |
no test coverage detected