Просмотр исходного кода

Changed references of SeleniumRC to SeleniumWebDriver to avoid confusion

Gordon Child 14 лет назад
Родитель
Сommit
2d5989f58a
4 измененных файлов с 9 добавлено и 9 удалено
  1. 1 1
      MANIFEST
  2. 1 1
      lib/Selenium/Remote/RemoteConnection.pm
  3. 2 2
      t/05-driver-mock.t
  4. 5 5
      t/lib/MockSeleniumWebDriver.pm

+ 1 - 1
MANIFEST

@@ -15,7 +15,7 @@ t/04-commands-implemented.t
 t/05-driver-mock.t
 t/mock-recordings/05-driver-mock-recording.json
 t/http-server.pl
-t/lib/MockSeleniumRC.pm
+t/lib/MockSeleniumWebDriver.pm
 inc/Module/AutoInstall.pm
 inc/Module/Install/AutoInstall.pm
 inc/Module/Install/Base.pm

+ 1 - 1
lib/Selenium/Remote/RemoteConnection.pm

@@ -22,7 +22,7 @@ sub new {
     };
     bless $self, $class or die "Can't bless $class: $!";
     my $status = eval {$self->request('GET','status');};
-    croak "Could not connect to SeleniumRC" if($@);
+    croak "Could not connect to SeleniumWebDriver" if($@);
     if($status->{cmd_status} eq 'OK') {
       return $self;
     } else {

+ 2 - 2
t/05-driver-mock.t

@@ -4,7 +4,7 @@ use warnings;
 
 use Test::More;
 use Data::Dumper;
-use t::lib::MockSeleniumRC;
+use t::lib::MockSeleniumWebDriver;
 
 use_ok('Selenium::Remote::Driver');
 
@@ -22,7 +22,7 @@ if ($^O eq 'MSWin32' && $ENV{RELEASE_TESTING})
 my $website = 'http://localhost:63636';
 
 my $record = $ENV{RELEASE_TESTING};
-t::lib::MockSeleniumRC::register($record,'t/mock-recordings/05-driver-mock-recording.json');
+t::lib::MockSeleniumWebDriver::register($record,'t/mock-recordings/05-driver-mock-recording.json');
 
 my $driver = Selenium::Remote::Driver->new;
 isa_ok($driver,'Selenium::Remote::Driver');

+ 5 - 5
t/lib/MockSeleniumRC.pm → t/lib/MockSeleniumWebDriver.pm

@@ -1,11 +1,11 @@
-package t::lib::MockSeleniumRC;
+package t::lib::MockSeleniumWebDriver;
 use strict;
 use warnings;
 
 use LWP::Protocol::PSGI;
 use JSON;
 
-our $MockSeleniumRCObj;
+our $MockSeleniumWebDriverObj;
 
 sub save_recording {
   my ($self) = @_;
@@ -38,13 +38,13 @@ sub register {
   } else {
     $self->load_recording;
   }
-  LWP::Protocol::PSGI->register(\&t::lib::MockSeleniumRC::psgi_app);
-  $MockSeleniumRCObj = $self;
+  LWP::Protocol::PSGI->register(\&t::lib::MockSeleniumWebDriver::psgi_app);
+  $MockSeleniumWebDriverObj = $self;
 }
 
 sub psgi_app {
   my $env = shift;
-  my $self = $MockSeleniumRCObj;
+  my $self = $MockSeleniumWebDriverObj;
   my $uri =
       $env->{'psgi.url_scheme'} . '://'
     . $env->{SERVER_NAME} . ':'