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 +++++-- .../tests/level1/html/HTMLTitleElement01.xml | 42 ++++++++++++++++++++++ .../tests/level1/html/HTMLTitleElement01.xml.kfail | 42 ---------------------- 3 files changed, 52 insertions(+), 45 deletions(-) create mode 100644 test/testcases/tests/level1/html/HTMLTitleElement01.xml delete mode 100644 test/testcases/tests/level1/html/HTMLTitleElement01.xml.kfail (limited to 'test') 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; diff --git a/test/testcases/tests/level1/html/HTMLTitleElement01.xml b/test/testcases/tests/level1/html/HTMLTitleElement01.xml new file mode 100644 index 0000000..9b95d95 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLTitleElement01.xml @@ -0,0 +1,42 @@ + + + + + + + +HTMLTitleElement01 +NIST + + The text attribute is the specified title as a string. + + Retrieve the text attribute and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLTitleElement01.xml.kfail b/test/testcases/tests/level1/html/HTMLTitleElement01.xml.kfail deleted file mode 100644 index 9b95d95..0000000 --- a/test/testcases/tests/level1/html/HTMLTitleElement01.xml.kfail +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -HTMLTitleElement01 -NIST - - The text attribute is the specified title as a string. - - Retrieve the text attribute and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - -- cgit v1.2.3