Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: chrome/test/chromedriver/test/run_py_tests.py

Issue 663343003: [chromedriver] Fix tests with viewport; force touch emulation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing commetns Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test/run_py_tests.py
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index fc2d9b115207ee0fcbb8f6d12f2768ad136031fd..7ac6d286e54ff1d06c71a06087ed20f44fa500c8 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -961,9 +961,7 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
})
driver.Load(self._http_server.GetUrl() + '/userAgentUseDeviceWidth')
self.assertTrue(driver.capabilities['mobileEmulationEnabled'])
- self.assertEqual(360, driver.ExecuteScript('return window.innerWidth'))
self.assertEqual(360, driver.ExecuteScript('return window.screen.width'))
- self.assertEqual(640, driver.ExecuteScript('return window.innerHeight'))
self.assertEqual(640, driver.ExecuteScript('return window.screen.height'))
def testUserAgent(self):
@@ -977,9 +975,7 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
driver = self.CreateDriver(
mobile_emulation = {'deviceName': 'Google Nexus 5'})
driver.Load(self._http_server.GetUrl() + '/userAgentUseDeviceWidth')
- self.assertEqual(360, driver.ExecuteScript('return window.innerWidth'))
self.assertEqual(360, driver.ExecuteScript('return window.screen.width'))
- self.assertEqual(640, driver.ExecuteScript('return window.innerHeight'))
self.assertEqual(640, driver.ExecuteScript('return window.screen.height'))
body_tag = driver.FindElement('tag name', 'body')
self.assertEqual(
@@ -1006,6 +1002,7 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
def testHoverOverElement(self):
driver = self.CreateDriver(
mobile_emulation = {'deviceName': 'Google Nexus 5'})
+ driver.Load('about:blank')
div = driver.ExecuteScript(
'document.body.innerHTML = "<div>old</div>";'
'var div = document.getElementsByTagName("div")[0];'
@@ -1019,6 +1016,7 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
def testClickElement(self):
driver = self.CreateDriver(
mobile_emulation = {'deviceName': 'Google Nexus 5'})
+ driver.Load('about:blank')
div = driver.ExecuteScript(
'document.body.innerHTML = "<div>old</div>";'
'var div = document.getElementsByTagName("div")[0];'
@@ -1032,6 +1030,7 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
def testSingleTapElement(self):
driver = self.CreateDriver(
mobile_emulation = {'deviceName': 'Google Nexus 5'})
+ driver.Load('about:blank')
div = driver.ExecuteScript(
'document.body.innerHTML = "<div>old</div>";'
'var div = document.getElementsByTagName("div")[0];'
« no previous file with comments | « chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698