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

Unified Diff: tools/telemetry/telemetry/page/actions/scroll_unittest.py

Issue 180873008: Add support for python pageset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove attributes from page constructor Created 6 years, 9 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 | « tools/telemetry/telemetry/page/actions/page_action.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/scroll_unittest.py
diff --git a/tools/telemetry/telemetry/page/actions/scroll_unittest.py b/tools/telemetry/telemetry/page/actions/scroll_unittest.py
index cb5cb4f9dddc26eaafc872fcc1c2e5fb74f9c74d..98684f974a8e04264c4f361e10bc2597dd31eb2e 100644
--- a/tools/telemetry/telemetry/page/actions/scroll_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/scroll_unittest.py
@@ -16,12 +16,11 @@ class ScrollActionTest(tab_test_case.TabTestCase):
super(ScrollActionTest, self).setUp()
def CreateAndNavigateToPageFromUnittestDataDir(
- self, filename, page_attributes):
+ self, filename):
self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
page = page_module.Page(
self._browser.http_server.UrlOf(filename),
- None, # In this test, we don't need a page set.
- attributes=page_attributes)
+ None) # In this test, we don't need a page set.
self._tab.Navigate(page.url)
self._tab.WaitForDocumentReadyStateToBeComplete()
@@ -30,11 +29,8 @@ class ScrollActionTest(tab_test_case.TabTestCase):
@test.Disabled # Disabled due to flakiness: crbug.com/330544
def testScrollAction(self):
- page = self.CreateAndNavigateToPageFromUnittestDataDir(
- "blank.html",
- page_attributes={"smoothness": {
- "action": "scroll"
- }})
+ page = self.CreateAndNavigateToPageFromUnittestDataDir("blank.html")
+ setattr(page, 'smoothness', {"action": "scroll"})
# Make page bigger than window so it's scrollable.
self._tab.ExecuteJavaScript("""document.body.style.height =
(2 * window.innerHeight + 1) + 'px';""")
@@ -69,7 +65,7 @@ class ScrollActionTest(tab_test_case.TabTestCase):
(scroll_position, scroll_height))
def testBoundingClientRect(self):
- self.CreateAndNavigateToPageFromUnittestDataDir('blank.html', {})
+ self.CreateAndNavigateToPageFromUnittestDataDir('blank.html')
with open(os.path.join(os.path.dirname(__file__),
'gesture_common.js')) as f:
js = f.read()
« no previous file with comments | « tools/telemetry/telemetry/page/actions/page_action.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698