Browse Source

Re-balance assorted whitespace

Daniel Gempesaw 10 years ago
parent
commit
b07e7bbb38
2 changed files with 16 additions and 17 deletions
  1. 13 14
      lib/Selenium/Remote/Driver.pm
  2. 3 3
      t/01-driver.t

+ 13 - 14
lib/Selenium/Remote/Driver.pm

@@ -145,12 +145,12 @@ available here.
     not part of the browser-related desired capabilities. These items
     not part of the browser-related desired capabilities. These items
     are also optional.
     are also optional.
 
 
-        'auto_close'           - <boolean>  - whether driver should end session on remote server on close.
-        'base_url'             - <string>   - OPTIONAL, base url for the website Selenium acts on. This can save you from repeating the domain in every call to $driver->get()
-        'default_finder'       - <string>   - choose default finder used for find_element* {class|class_name|css|id|link|link_text|name|partial_link_text|tag_name|xpath}
-        'inner_window_size'    - <aref[Int]>- An array ref [ height, width ] that the browser window should use as its initial size immediately after instantiation
-        'webelement_class'     - <string>   - sub-class of Selenium::Remote::WebElement if you wish to use an alternate WebElement class.
+        'auto_close'           - <boolean>   - whether driver should end session on remote server on close.
+        'base_url'             - <string>    - OPTIONAL, base url for the website Selenium acts on. This can save you from repeating the domain in every call to $driver->get()
+        'default_finder'       - <string>    - choose default finder used for find_element* {class|class_name|css|id|link|link_text|name|partial_link_text|tag_name|xpath}
+        'inner_window_size'    - <aref[Int]> - An array ref [ height, width ] that the browser window should use as its initial size immediately after instantiation
         'on_error'             - CODEREF     - A CODEREF that we will call in event of any exceptions. See L</on_error> for more details.
         'on_error'             - CODEREF     - A CODEREF that we will call in event of any exceptions. See L</on_error> for more details.
+        'webelement_class'     - <string>    - sub-class of Selenium::Remote::WebElement if you wish to use an alternate WebElement class.
         'ua'                   - LWP::UserAgent instance - if you wish to use a specific $ua, like from Test::LWP::UserAgent
         'ua'                   - LWP::UserAgent instance - if you wish to use a specific $ua, like from Test::LWP::UserAgent
 
 
     If no values are provided, then these defaults will be assumed:
     If no values are provided, then these defaults will be assumed:
@@ -254,7 +254,6 @@ C<eval>, or use the parameterized versions find_element_*).
 =head2 new_from_caps
 =head2 new_from_caps
 
 
  Description:
  Description:
-
     For experienced users who want complete control over the desired
     For experienced users who want complete control over the desired
     capabilities, use this alternative constructor along with the
     capabilities, use this alternative constructor along with the
     C<desired_capabilities> hash key in the init hash. Unlike "new",
     C<desired_capabilities> hash key in the init hash. Unlike "new",
@@ -516,20 +515,20 @@ sub DEMOLISH {
 # We install an 'around' because we can catch more exceptions this way
 # We install an 'around' because we can catch more exceptions this way
 # than simply wrapping the explicit croaks in _execute_command.
 # than simply wrapping the explicit croaks in _execute_command.
 
 
-around '_execute_command' => sub { 
-    my $orig = shift; 
-    my $self = shift; 
+around '_execute_command' => sub {
+    my $orig = shift;
+    my $self = shift;
     # copy @_ because it gets lost in the way
     # copy @_ because it gets lost in the way
     my @args = @_;
     my @args = @_;
-    my $return_value; 
-    try { 
+    my $return_value;
+    try {
         $return_value = $orig->($self,@args);
         $return_value = $orig->($self,@args);
     }
     }
-    catch { 
-        if ($self->has_on_error) { 
+    catch {
+        if ($self->has_on_error) {
             $self->on_error->($self,$_);
             $self->on_error->($self,$_);
         }
         }
-        else { 
+        else {
             croak $_;
             croak $_;
         }
         }
     };
     };

+ 3 - 3
t/01-driver.t

@@ -516,12 +516,12 @@ UPLOAD: {
     }
     }
 }
 }
 
 
-ERROR: { 
+ERROR: {
     # driver behaviour on error
     # driver behaviour on error
     $driver->on_error(sub { my ($self,$error_msg) = @_; croak("Got message: $error_msg");});
     $driver->on_error(sub { my ($self,$error_msg) = @_; croak("Got message: $error_msg");});
-    like( exception{ $driver->find_element("somethingthatdoesnotexist") }, qr/^Got message:/, "Error handler catches correctly an error"); 
+    like( exception { $driver->find_element("somethingthatdoesnotexist") }, qr/^Got message:/, "Error handler catches correctly an error");
     $driver->clear_on_error;
     $driver->clear_on_error;
-    unlike( exception{ $driver->find_element("somethingthatdoesnotexist") }, qr/^Got message:/, "Error handler was correctly cleared");
+    unlike( exception { $driver->find_element("somethingthatdoesnotexist") }, qr/^Got message:/, "Error handler was correctly cleared");
 }
 }
 
 
 QUIT: {
 QUIT: {