mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Add testcases.
This commit is contained in:
parent
17e888bfea
commit
80e3109bc9
2 changed files with 62 additions and 1 deletions
|
@ -15,7 +15,12 @@
|
|||
<a href="http://www.mozilla.org"></a>
|
||||
<img src="test.jpg"/>
|
||||
<embed></embed>
|
||||
<form></form>
|
||||
<form>
|
||||
<fieldset>
|
||||
<legend>legend</legend>
|
||||
<label for="">label<input type="text" value="input" /></label>
|
||||
</fieldset>
|
||||
</form>
|
||||
<hr />
|
||||
<canvas/>
|
||||
<p>pppppppppp</p>
|
||||
|
@ -50,5 +55,10 @@
|
|||
</audio>
|
||||
<area></area>
|
||||
<data></data>
|
||||
<template></template>
|
||||
<pre>pre</pre>
|
||||
<video src="">
|
||||
<track></track>
|
||||
</video>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -241,6 +241,57 @@ window.alert(tags.length);
|
|||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLProgressElement);
|
||||
|
||||
window.alert("HTMLTemplateElement:");
|
||||
let tags = document.getElementsByTagName("template");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLTemplateElement);
|
||||
|
||||
window.alert("HTMLPreElement:");
|
||||
let tags = document.getElementsByTagName("pre");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLPreElement);
|
||||
|
||||
window.alert("HTMLLegendElement:");
|
||||
let tags = document.getElementsByTagName("legend");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLLegendElement);
|
||||
|
||||
window.alert("HTMLLabelElement:");
|
||||
let tags = document.getElementsByTagName("label");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLLabelElement);
|
||||
|
||||
window.alert("HTMLTrackElement:");
|
||||
let tags = document.getElementsByTagName("track");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLTrackElement);
|
||||
|
||||
window.alert("HTMLAudioElement:");
|
||||
let tags = document.getElementsByTagName("audio");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLMediaElement);
|
||||
window.alert(tags[0] instanceof HTMLAudioElement);
|
||||
|
||||
window.alert("HTMLVideoElement:");
|
||||
let tags = document.getElementsByTagName("video");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLMediaElement);
|
||||
window.alert(tags[0] instanceof HTMLVideoElement);
|
||||
|
||||
//TODO: Doesn't work until we throw proper exceptions instead of returning 0 on
|
||||
// unwrap failure.
|
||||
/*try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue