mirror of
https://github.com/servo/servo.git
synced 2025-06-20 07:08:59 +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>
|
<a href="http://www.mozilla.org"></a>
|
||||||
<img src="test.jpg"/>
|
<img src="test.jpg"/>
|
||||||
<embed></embed>
|
<embed></embed>
|
||||||
<form></form>
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>legend</legend>
|
||||||
|
<label for="">label<input type="text" value="input" /></label>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
<hr />
|
<hr />
|
||||||
<canvas/>
|
<canvas/>
|
||||||
<p>pppppppppp</p>
|
<p>pppppppppp</p>
|
||||||
|
@ -50,5 +55,10 @@
|
||||||
</audio>
|
</audio>
|
||||||
<area></area>
|
<area></area>
|
||||||
<data></data>
|
<data></data>
|
||||||
|
<template></template>
|
||||||
|
<pre>pre</pre>
|
||||||
|
<video src="">
|
||||||
|
<track></track>
|
||||||
|
</video>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -241,6 +241,57 @@ window.alert(tags.length);
|
||||||
window.alert(tags[0].tagName);
|
window.alert(tags[0].tagName);
|
||||||
window.alert(tags[0] instanceof HTMLProgressElement);
|
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
|
//TODO: Doesn't work until we throw proper exceptions instead of returning 0 on
|
||||||
// unwrap failure.
|
// unwrap failure.
|
||||||
/*try {
|
/*try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue