1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 10:35:41 -04:00
perlbuut/deps/JavaScript-SpiderMonkey-0.19-patched/t/.svn/text-base/05form.t.svn-base
2009-12-05 00:02:04 -05:00

31 lines
602 B
Text

######################################################################
# docwrite()
######################################################################
print "1..1\n";
$init = "";
require "t/init.pl";
my $source = <<EOT;
$init
function FormSubmit () {
document.location.href = "submitted!";
}
function Form() {
this.submit = FormSubmit;
}
document.form[0] = new Form;
document.form[0].submit();
EOT
my $rc = $js->eval($source);
die "eval returned undef" unless $rc;
if($js->property_get("document.location.href") ne "submitted!") {
print "not ";
}
print "ok 1\n";
$js->destroy();