From 73cbed2db0bb587f2c544cdf92dbf56eb7a79971 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 7 Jul 2012 15:31:40 +0100 Subject: HTMLTitleElement: Implementation and enabling of test --- test/DOMTSHandler.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'test/DOMTSHandler.pm') diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm index dd5a7a8..37f6166 100644 --- a/test/DOMTSHandler.pm +++ b/test/DOMTSHandler.pm @@ -788,7 +788,7 @@ sub generate_attribute_fetcher { } my $fetcher = to_attribute_fetcher($ats{'interface'}, "$en"); - + my $cast = to_attribute_cast($ats{'interface'}); my $unref = 0; my $temp_node = 0; # Deal with the situation like @@ -807,14 +807,14 @@ sub generate_attribute_fetcher { my $t = type_to_ctype($self->{'var'}->{$ats{'var'}}); $tnode_index ++; print "\t$t tnode$tnode_index = NULL;\n"; - print "\texp = $fetcher($ats{'obj'}, \&tnode$tnode_index);\n"; + print "\texp = $fetcher(${cast}$ats{'obj'}, \&tnode$tnode_index);\n"; # The ats{'obj'} must have been added to cleanup stack $unref = 1; # Indicate that we have created a temp node $temp_node = 1; } else { $unref = $self->param_unref($ats{'var'}); - print "\texp = $fetcher($ats{'obj'}, \&$ats{'var'});\n"; + print "\texp = $fetcher(${cast}$ats{'obj'}, \&$ats{'var'});\n"; } @@ -1379,6 +1379,13 @@ sub to_attribute_accessor { return $ret; } +sub to_attribute_cast { + my $type = shift; + my $ret = get_prefix($type); + $ret =~ s/h_t_m_l/html/; + return "(${ret} *)"; +} + sub get_prefix { my $type = shift; -- cgit v1.2.3