Francois Gouget : testbot: Add Page::GetParamNames() to retrieve a page' s parameter names.

Alexandre Julliard julliard at winehq.org
Mon Jun 19 13:47:06 CDT 2017


Module: tools
Branch: master
Commit: 9cb4b0b9932bfe027529d367aa50e08b461ccf27
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=9cb4b0b9932bfe027529d367aa50e08b461ccf27

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Jun 19 09:06:22 2017 +0200

testbot: Add Page::GetParamNames() to retrieve a page's parameter names.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 bc7eb0b..fb743a0 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 046fd12..1fb2ca3 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.




More information about the wine-cvs mailing list