Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/ObjectModel/CGI/Page.pm | 7 +++++++ testbot/lib/WineTestBot/CGI/PageBase.pm | 11 +++++++++++ 2 files changed, 18 insertions(+)
diff --git a/testbot/lib/ObjectModel/CGI/Page.pm b/testbot/lib/ObjectModel/CGI/Page.pm index d7463b5a8..406ca4ff8 100644 --- a/testbot/lib/ObjectModel/CGI/Page.pm +++ b/testbot/lib/ObjectModel/CGI/Page.pm @@ -369,6 +369,13 @@ sub GetTitle($) return undef; }
+sub GenerateImportJS($$) +{ + my ($self, $Filename) = @_; + + $self->{PageBase}->GenerateImportJS($Filename); +} + sub GenerateHttpHeaders($) { my ($self) = @_; diff --git a/testbot/lib/WineTestBot/CGI/PageBase.pm b/testbot/lib/WineTestBot/CGI/PageBase.pm index 477a2ff15..0dacbf6dd 100644 --- a/testbot/lib/WineTestBot/CGI/PageBase.pm +++ b/testbot/lib/WineTestBot/CGI/PageBase.pm @@ -397,6 +397,17 @@ sub GetPageTitle($$) return $Title; }
+sub GenerateImportJS($$) +{ + my ($self, $Filename) = @_; + + if (!$self->{js}->{$Filename}) + { + print "<script type='text/javascript' src='$Filename'></script>\n"; + $self->{js}->{$Filename} = 1; + } +} + sub GenerateHttpHeaders($) { my ($self) = @_;