11cb0ef41Sopenharmony_ci// This intentionally does not use resources/urltestdata.json to preserve resources.
21cb0ef41Sopenharmony_ci[
31cb0ef41Sopenharmony_ci  {
41cb0ef41Sopenharmony_ci    "url": undefined,
51cb0ef41Sopenharmony_ci    "base": undefined,
61cb0ef41Sopenharmony_ci    "expected": false
71cb0ef41Sopenharmony_ci  },
81cb0ef41Sopenharmony_ci  {
91cb0ef41Sopenharmony_ci    "url": "a:b",
101cb0ef41Sopenharmony_ci    "base": undefined,
111cb0ef41Sopenharmony_ci    "expected": true
121cb0ef41Sopenharmony_ci  },
131cb0ef41Sopenharmony_ci  {
141cb0ef41Sopenharmony_ci    "url": undefined,
151cb0ef41Sopenharmony_ci    "base": "a:b",
161cb0ef41Sopenharmony_ci    "expected": false
171cb0ef41Sopenharmony_ci  },
181cb0ef41Sopenharmony_ci  {
191cb0ef41Sopenharmony_ci    "url": "a:/b",
201cb0ef41Sopenharmony_ci    "base": undefined,
211cb0ef41Sopenharmony_ci    "expected": true
221cb0ef41Sopenharmony_ci  },
231cb0ef41Sopenharmony_ci  {
241cb0ef41Sopenharmony_ci    "url": undefined,
251cb0ef41Sopenharmony_ci    "base": "a:/b",
261cb0ef41Sopenharmony_ci    "expected": true
271cb0ef41Sopenharmony_ci  },
281cb0ef41Sopenharmony_ci  {
291cb0ef41Sopenharmony_ci    "url": "https://test:test",
301cb0ef41Sopenharmony_ci    "base": undefined,
311cb0ef41Sopenharmony_ci    "expected": false
321cb0ef41Sopenharmony_ci  },
331cb0ef41Sopenharmony_ci  {
341cb0ef41Sopenharmony_ci    "url": "a",
351cb0ef41Sopenharmony_ci    "base": "https://b/",
361cb0ef41Sopenharmony_ci    "expected": true
371cb0ef41Sopenharmony_ci  }
381cb0ef41Sopenharmony_ci].forEach(({ url, base, expected }) => {
391cb0ef41Sopenharmony_ci  test(() => {
401cb0ef41Sopenharmony_ci    assert_equals(URL.canParse(url, base), expected);
411cb0ef41Sopenharmony_ci  }, `URL.canParse(${url}, ${base})`);
421cb0ef41Sopenharmony_ci});
43