HTML-HTML5-DOM
view release on metacpan or search on metacpan
t/02simple.t view on Meta::CPAN
"HTMLFormElement->submit",
);
is(
$submit->uri->as_string,
'http://www.example.com/search?q=foo',
'HTMLFormElement->submit->uri is correct URI',
);
is(
$dom->p5_tables->get_node(1)->caption->textContent,
'A table',
'HTMLDocument->p5_tables and HTMLTableElement->caption',
);
ok(
$dom->p5_tables->get_node(1)->deleteCaption,
'HTMLTableElement->deleteCaption',
);
is(
scalar $dom->p5_tables->get_node(1)->caption,
undef,
'HTMLDocument->p5_tables and HTMLTableElement->caption',
);
isa_ok(
$dom->p5_tables->get_node(1)->createCaption,
'caption',
'HTMLTableElement->createCaption',
);
is_deeply(
[$dom->getElementsByTagName('link')->get_node(1)->relList],
[qw< stylesheet holoitem >],
'HTMLLinkElement->relList',
)
__DATA__
<!doctype html>
<html>
<head profile="http://www.w3.org/1999/xhtml/vocab">
<title>The Title</title>
<link
rel="stylesheet holoitem holoitem stylesheet"
type="text/css"
media="hologram"
href="hologram.css"
>
</head>
<body>
<h1>The Heading</h1>
<table>
<caption><a name="table"></a>A table</caption>
<tr>
<td><a href="http://www.example.com/">a cell</a></td>
</tr>
</table>
<form action="http://www.example.com/search" method="get">
<fieldset>
<legend>A search form</legend>
<label for="q">search terms</label>
<input id="q" name="q" value="foo">
<br>
<input type="submit" value="search">
</fieldset>
</form>
</body>
</html>
( run in 0.430 second using v1.01-cache-2.11-cpan-d7f47b0818f )