r28977 - in /branches/upstream/libtest-www-selenium-perl/current: Changes Makefile.PL lib/Test/WWW/Selenium.pm

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Dec 31 18:35:26 UTC 2008


Author: gregoa
Date: Wed Dec 31 18:35:23 2008
New Revision: 28977

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28977
Log:
[svn-upgrade] Integrating new upstream version, libtest-www-selenium-perl (1.17)

Modified:
    branches/upstream/libtest-www-selenium-perl/current/Changes
    branches/upstream/libtest-www-selenium-perl/current/Makefile.PL
    branches/upstream/libtest-www-selenium-perl/current/lib/Test/WWW/Selenium.pm

Modified: branches/upstream/libtest-www-selenium-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-www-selenium-perl/current/Changes?rev=28977&op=diff
==============================================================================
--- branches/upstream/libtest-www-selenium-perl/current/Changes (original)
+++ branches/upstream/libtest-www-selenium-perl/current/Changes Wed Dec 31 18:35:23 2008
@@ -1,9 +1,14 @@
 Revision history for Perl extension Test::WWW::Selenium.
+
+1.17 - Tue 30 Dec 2008 00:12:53 PST
+ - Allow no_locator methods to be subclassable
+   - Thanks to Michael Hendricks of Grant Street Group.
 
 1.16 - Sun 14 Dec 2008 15:28:38 PST
  - use POST instead of GET to selenium server (gyrm)
  - add support for per-session javascript (gyrm)
  - add unit tests and docs for re-using session_ids
+ - added LWP::UserAgent dependency to fix cpan testers failures
 
 1.15 - Sun 23 Mar 2008 14:02:25 PDT
  - allow set_timeout() to be called before open()

Modified: branches/upstream/libtest-www-selenium-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-www-selenium-perl/current/Makefile.PL?rev=28977&op=diff
==============================================================================
--- branches/upstream/libtest-www-selenium-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-www-selenium-perl/current/Makefile.PL Wed Dec 31 18:35:23 2008
@@ -3,8 +3,13 @@
 use strict;
 use inc::Module::Install;
 
+# Need to explicitly pre-load this so it doesn't conflict with a mocked one
+# created by loading Test::Mock::LWP
+use LWP::UserAgent;
+
 name            'Test-WWW-Selenium';
 author          'Luke Closs <test-www-selenium at awesnob.com>';
+requires       'LWP::UserAgent'  => 0;
 requires       'URI::Escape'     => '1.31';
 build_requires 'Test::More'      => '0.42';
 build_requires 'Test::Exception' => 0;

Modified: branches/upstream/libtest-www-selenium-perl/current/lib/Test/WWW/Selenium.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-www-selenium-perl/current/lib/Test/WWW/Selenium.pm?rev=28977&op=diff
==============================================================================
--- branches/upstream/libtest-www-selenium-perl/current/lib/Test/WWW/Selenium.pm (original)
+++ branches/upstream/libtest-www-selenium-perl/current/lib/Test/WWW/Selenium.pm Wed Dec 31 18:35:23 2008
@@ -4,7 +4,7 @@
 use base qw(WWW::Selenium);
 use Carp qw(croak);
 
-our $VERSION = '1.16';
+our $VERSION = '1.17';
 
 =head1 NAME
 
@@ -89,11 +89,17 @@
 my %no_locator = map { $_ => 1 }
                 qw(alert confirmation prompt absolute_location location
                    title body_text all_buttons all_links all_fields);
+sub no_locator {
+    my $self   = shift;
+    my $method = shift;
+    return $no_locator{$method};
+}
 
 sub AUTOLOAD {
     my $name = $AUTOLOAD;
     $name =~ s/.*:://;
     return if $name eq 'DESTROY';
+    my $self = $_[0];
 
     my $sub;
     if ($name =~ /(\w+)_(is|isnt|like|unlike)$/i) {
@@ -102,7 +108,7 @@
 
         # make a subroutine that will call Test::Builder's test methods
         # with selenium data from the getter
-        if ($no_locator{$1}) {
+        if ($self->no_locator($1)) {
             $sub = sub {
                 my( $self, $str, $name ) = @_;
                 diag "Test::WWW::Selenium running $getter (@_[1..$#_])"




More information about the Pkg-perl-cvs-commits mailing list