Add testcases.

This commit is contained in:
Tetsuharu OHZEKI 2013-08-31 19:58:30 +09:00
parent 17e888bfea
commit 80e3109bc9
2 changed files with 62 additions and 1 deletions

View file

@ -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>

View file

@ -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 {