[Tools 1/2] testbot: Add Page::GetParamNames() to retrieve a page's parameter names.

Francois Gouget fgouget at codeweavers.com
Mon Jun 19 02:06:22 CDT 2017


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/ObjectModel/CGI/FormPage.pm |  2 +-
 testbot/lib/ObjectModel/CGI/Page.pm     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm
index bc7eb0b0..fb743a00 100644
--- a/testbot/lib/ObjectModel/CGI/FormPage.pm
+++ b/testbot/lib/ObjectModel/CGI/FormPage.pm
@@ -362,7 +362,7 @@ sub Save($)
 {
   my ($self) = @_;
 
-  my @ParamNames = $self->GetParam();
+  my @ParamNames = $self->GetParamNames();
   foreach my $ParameterName (@ParamNames)
   {
     my $PropertyDescriptor = $self->GetPropertyDescriptorByName($ParameterName);
diff --git a/testbot/lib/ObjectModel/CGI/Page.pm b/testbot/lib/ObjectModel/CGI/Page.pm
index 046fd123..1fb2ca32 100644
--- a/testbot/lib/ObjectModel/CGI/Page.pm
+++ b/testbot/lib/ObjectModel/CGI/Page.pm
@@ -58,6 +58,23 @@ sub _initialize($$$)
 =pod
 =over 12
 
+=head1 C<GetParamNames()>
+
+Returns the list of parameter names.
+
+=back
+=cut
+
+sub GetParamNames($)
+{
+  my $self = shift;
+
+  return $self->{CGIObj}->param();
+}
+
+=pod
+=over 12
+
 =head1 C<GetParam()>
 
 This thunks to CGI::param() and thus takes the same arguments list.
-- 
2.11.0




More information about the wine-patches mailing list