@throws Exception if an error occurs
()
| 1195 | * @throws Exception if an error occurs |
| 1196 | */ |
| 1197 | @Test |
| 1198 | @Alerts("https://developer.mozilla.org/") |
| 1199 | public void toJSON() throws Exception { |
| 1200 | final String html = DOCTYPE_HTML |
| 1201 | + "<html><body>\n" |
| 1202 | + "<script>\n" |
| 1203 | + LOG_TITLE_FUNCTION |
| 1204 | + " if (typeof window.URL === 'function') {\n" |
| 1205 | + " var u = new URL('/', 'https://developer.mozilla.org');\n" |
| 1206 | + " log(u.toJSON());\n" |
| 1207 | + " }\n" |
| 1208 | + "</script>\n" |
| 1209 | + "</body></html>"; |
| 1210 | |
| 1211 | loadPageVerifyTitle2(html); |
| 1212 | } |
| 1213 | |
| 1214 | /** |
| 1215 | * @throws Exception if the test fails |
no test coverage detected