Skip to content

Commit

Permalink
Add testcases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetsuharu OHZEKI committed Aug 31, 2013
1 parent 17e888b commit 80e3109
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/test/html/test_bindings.html
Expand Up @@ -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>
Expand Down Expand Up @@ -50,5 +55,10 @@
</audio>
<area></area>
<data></data>
<template></template>
<pre>pre</pre>
<video src="">
<track></track>
</video>
</body>
</html>
51 changes: 51 additions & 0 deletions src/test/html/test_bindings.js
Expand Up @@ -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 {
Expand Down

12 comments on commit 80e3109

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from jdm
at tetsuharuohzeki@80e3109

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging saneyuki/servo/webidl = 80e3109 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saneyuki/servo/webidl = 80e3109 merged ok, testing candidate = 971661f

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from jdm
at tetsuharuohzeki@80e3109

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging saneyuki/servo/webidl = 80e3109 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saneyuki/servo/webidl = 80e3109 merged ok, testing candidate = 28df7a2

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from jdm
at tetsuharuohzeki@80e3109

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging saneyuki/servo/webidl = 80e3109 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saneyuki/servo/webidl = 80e3109 merged ok, testing candidate = 4cfcad0

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4cfcad0

Please sign in to comment.