Commit 36cc72d0 authored by Richard Bustamante's avatar Richard Bustamante Committed by Commit Bot

Update failing webdriver tests with decorators/updates

-Video.testVideoMetrics - A new version of ffmpeg changed the duration of the test video by 0.004 seconds.  The dev team confirmed this is fine.  Updating the expected value.  Also changing the level of variance to 0.01 so this is less brittle in the future.
-Smoke.testPageID - Add a >=59 decorator as this tests is only applicable for M59+
-LitePage.testLitePageNotAcceptedForCellularOnlyFlag - Add a >=61 decorator as this tests is only applicable for M61+

Bug: 740668,740670
Change-Id: Ib6fcdfa80f57eee195c09d21fc36157e7259bd3f
Reviewed-on: https://chromium-review.googlesource.com/565627
Commit-Queue: Richard Bustamante <bustamante@google.com>
Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Reviewed-by: default avatarScott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486083}
parent 1c3414ae
...@@ -98,6 +98,7 @@ class LitePage(IntegrationTest): ...@@ -98,6 +98,7 @@ class LitePage(IntegrationTest):
# Checks that a Lite Page is not served for the Cellular-Only option but # Checks that a Lite Page is not served for the Cellular-Only option but
# not on cellular connection. # not on cellular connection.
@ChromeVersionEqualOrAfterM(61)
def testLitePageNotAcceptedForCellularOnlyFlag(self): def testLitePageNotAcceptedForCellularOnlyFlag(self):
with TestDriver() as test_driver: with TestDriver() as test_driver:
test_driver.AddChromeArg('--enable-spdy-proxy-auth') test_driver.AddChromeArg('--enable-spdy-proxy-auth')
......
...@@ -7,6 +7,7 @@ import time ...@@ -7,6 +7,7 @@ import time
from common import TestDriver from common import TestDriver
from common import IntegrationTest from common import IntegrationTest
from decorators import NotAndroid from decorators import NotAndroid
from decorators import ChromeVersionEqualOrAfterM
class Smoke(IntegrationTest): class Smoke(IntegrationTest):
...@@ -101,6 +102,7 @@ class Smoke(IntegrationTest): ...@@ -101,6 +102,7 @@ class Smoke(IntegrationTest):
self.assertEqual(200, response.status) self.assertEqual(200, response.status)
# Verify unique page IDs are sent in the Chrome-Proxy header. # Verify unique page IDs are sent in the Chrome-Proxy header.
@ChromeVersionEqualOrAfterM(59)
def testPageID(self): def testPageID(self):
with TestDriver() as t: with TestDriver() as t:
t.AddChromeArg('--enable-spdy-proxy-auth') t.AddChromeArg('--enable-spdy-proxy-auth')
......
...@@ -52,7 +52,7 @@ class Video(IntegrationTest): ...@@ -52,7 +52,7 @@ class Video(IntegrationTest):
@Slow @Slow
def testVideoMetrics(self): def testVideoMetrics(self):
expected = { expected = {
'duration': 3.124, 'duration': 3.128,
'webkitDecodedFrameCount': 54.0, 'webkitDecodedFrameCount': 54.0,
'videoWidth': 1280.0, 'videoWidth': 1280.0,
'videoHeight': 720.0 'videoHeight': 720.0
...@@ -81,7 +81,7 @@ class Video(IntegrationTest): ...@@ -81,7 +81,7 @@ class Video(IntegrationTest):
'document.querySelectorAll("video")[0].%s' % metric)) 'document.querySelectorAll("video")[0].%s' % metric))
self.assertAlmostEqual(expected[metric], actual, msg="Compressed video " self.assertAlmostEqual(expected[metric], actual, msg="Compressed video "
"metric doesn't match expected! Metric=%s Expected=%f Actual=%f" "metric doesn't match expected! Metric=%s Expected=%f Actual=%f"
% (metric, expected[metric], actual), places=None, delta=0.001) % (metric, expected[metric], actual), places=None, delta=0.01)
# Check that the compressed video can be seeked. Use a slow network to ensure # Check that the compressed video can be seeked. Use a slow network to ensure
# the entire video isn't downloaded before we have a chance to seek. # the entire video isn't downloaded before we have a chance to seek.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment