mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
22 lines
646 B
HTML
22 lines
646 B
HTML
<script language="javascript">
|
|
|
|
var TestFixture = {
|
|
test_button: function() {
|
|
JSUnit_BindElement ("text");
|
|
|
|
Assert.NotNull ("JSUnit_GetElement()", "text element exists");
|
|
Assert.NotNull ("JSUnit_GetElement('button')", "button element exists");
|
|
Assert.AreEqual ("you haven't clicked me...", "JSUnit_GetElement().innerHTML", "initial text");
|
|
|
|
var button = JSUnit_GetElement ("button");
|
|
JSUnit_Click(button);
|
|
|
|
/* it's okay to put stuff after this JSUnit_Click call since
|
|
* we didn't call JSUnit_TestCausesPageLoad */
|
|
|
|
Assert.AreEqual ("you clicked me!", "JSUnit_GetElement().innerHTML", "text after button click");
|
|
}
|
|
};
|
|
|
|
</script>
|