Browse Source

Skip maximize verification on linux

I record my linux mocks just on a vagrant machine, so firefox is running
headless. Apparently headless browsers don't care too much for
maximization, so we'll skip the tests on linux.
vagrant 11 năm trước cách đây
mục cha
commit
f1a0290f2f
1 tập tin đã thay đổi với 9 bổ sung3 xóa
  1. 9 3
      t/01-driver.t

+ 9 - 3
t/01-driver.t

@@ -176,9 +176,15 @@ WINDOW: {
     is ($ret->{'width'}, 480, 'Got the right width');
     $ret = $driver->maximize_window();
     is ($ret, 1, "Got confirmation from maximize");
-    $ret = $driver->get_window_size();
-    ok ($ret->{'height'} > 640, 'Height has increased');
-    ok ($ret->{'width'} > 480, 'Width has increased');
+
+  SKIP: {
+        skip 'headless browsers don\'t get maximized', 2
+          unless $^O =~ /darwin|MSWin32/;
+        $ret = $driver->get_window_size();
+        ok ($ret->{'height'} > 640, 'Height has increased');
+        ok ($ret->{'width'} > 480, 'Width has increased');
+    }
+
     $ret = $driver->get_page_source();
     ok($ret =~ m/^<html/i, 'Received page source');
     eval {$driver->set_implicit_wait_timeout(20001);};