(t *testing.T)
| 389 | } |
| 390 | |
| 391 | func TestGenElementsURLProperties(t *testing.T) { |
| 392 | t.Parallel() |
| 393 | rt, mi := getTestRuntimeAndModuleInstanceWithDoc(t, testGenElems) |
| 394 | |
| 395 | sel, parseError := mi.parseHTML(testGenElems) |
| 396 | if parseError != nil { |
| 397 | t.Errorf("Unable to parse html") |
| 398 | } |
| 399 | |
| 400 | urlTests := []struct { |
| 401 | id string |
| 402 | property string |
| 403 | baseURL string |
| 404 | data string |
| 405 | }{ |
| 406 | {"a2", "href", "http://example.com/testpath", ""}, |
| 407 | {"a3", "href", "http://example.com", "http://example.com/relpath"}, |
| 408 | {"a3", "href", "http://example.com/somepath", "http://example.com/relpath"}, |
| 409 | {"a3", "href", "http://example.com/subdir/", "http://example.com/subdir/relpath"}, |
| 410 | {"a4", "href", "http://example.com/", "http://example.com/abspath"}, |
| 411 | {"a4", "href", "http://example.com/subdir/", "http://example.com/abspath"}, |
| 412 | {"a5", "href", "http://example.com/path?a=no-a&c=no-c", "http://example.com/path?a=yes-a&b=yes-b"}, |
| 413 | {"a6", "href", "http://example.com/path#oldfrag", "http://example.com/path#testfrag"}, |
| 414 | {"a7", "href", "http://example.com/prevdir/prevpath", "http://example.com/prtpath"}, |
| 415 | {"a8", "href", "http://example.com/testpath", "http://example.com/testpath"}, |
| 416 | {"base1", "href", "http://example.com", "http://example.com/foo.html"}, |
| 417 | {"base2", "href", "http://example.com", "http://example.com"}, |
| 418 | {"base3", "href", "http://example.com", "http://example.com"}, |
| 419 | {"audio1", "src", "http://example.com", "http://example.com/foo.wav"}, |
| 420 | {"audio2", "src", "http://example.com", ""}, |
| 421 | {"audio3", "src", "http://example.com", "http://example.com"}, |
| 422 | {"form1", "action", "http://example.com/", "http://example.com/submit_url"}, |
| 423 | {"form2", "action", "http://example.com/", ""}, |
| 424 | {"form3", "action", "http://example.com/", "http://example.com/"}, |
| 425 | {"iframe1", "src", "http://example.com", "http://example.com/testframe.html"}, |
| 426 | {"iframe2", "src", "http://example.com", ""}, |
| 427 | {"iframe3", "src", "http://example.com", "http://example.com"}, |
| 428 | {"img1", "src", "http://example.com", "http://example.com/test.png"}, |
| 429 | {"img2", "src", "http://example.com", ""}, |
| 430 | {"img3", "src", "http://example.com", "http://example.com"}, |
| 431 | {"input5", "src", "http://example.com", "http://example.com/input.png"}, |
| 432 | {"input5b", "src", "http://example.com", ""}, |
| 433 | {"input5c", "src", "http://example.com", "http://example.com"}, |
| 434 | {"link1", "href", "http://example.com", "http://example.com/test.css"}, |
| 435 | {"link2", "href", "http://example.com", ""}, |
| 436 | {"link3", "href", "http://example.com", "http://example.com"}, |
| 437 | {"object1", "data", "http://example.com", "http://example.com/test.png"}, |
| 438 | {"object2", "data", "http://example.com", ""}, |
| 439 | {"object3", "data", "http://example.com", "http://example.com"}, |
| 440 | {"script1", "src", "http://example.com", "http://example.com/script.js"}, |
| 441 | {"script2", "src", "http://example.com", ""}, |
| 442 | {"script3", "src", "http://example.com", "http://example.com"}, |
| 443 | {"src1", "src", "http://example.com", "http://example.com/test.png"}, |
| 444 | {"src2", "src", "http://example.com", ""}, |
| 445 | {"src3", "src", "http://example.com", "http://example.com"}, |
| 446 | {"track1", "src", "http://example.com", "http://example.com/foo.en.vtt"}, |
| 447 | {"track3", "src", "http://example.com", ""}, |
| 448 | {"track4", "src", "http://example.com", "http://example.com"}, |
nothing calls this directly
no test coverage detected
searching dependent graphs…