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

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

Issue 469593002: [telemetry] Create BrowserTestCase to reuse the browser for browser_unittest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update page_test_test_case references in tools/perf/ Created 6 years, 4 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
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 b94ec57db3f400efab397765d71612353e65dd29..38605e865ef7eb5b145f58371aa8b316597d1279 100644
--- a/tools/telemetry/telemetry/page/actions/scroll_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/scroll_unittest.py
@@ -4,30 +4,16 @@
import os
-from telemetry.core import util
-from telemetry.page import page as page_module
from telemetry.page.actions import scroll
from telemetry.unittest import tab_test_case
from telemetry.unittest import test
class ScrollActionTest(tab_test_case.TabTestCase):
- def CreateAndNavigateToPageFromUnittestDataDir(
- 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.
-
- self._tab.Navigate(page.url)
- self._tab.WaitForDocumentReadyStateToBeComplete()
-
- return page
-
@test.Disabled # Disabled due to flakiness: crbug.com/330544
def testScrollAction(self):
- page = self.CreateAndNavigateToPageFromUnittestDataDir("blank.html")
- setattr(page, 'smoothness', {"action": "scroll"})
+ self.Navigate('blank.html')
+
# Make page bigger than window so it's scrollable.
self._tab.ExecuteJavaScript("""document.body.style.height =
(2 * window.innerHeight + 1) + 'px';""")
@@ -62,7 +48,8 @@ class ScrollActionTest(tab_test_case.TabTestCase):
(scroll_position, scroll_height))
def testBoundingClientRect(self):
- self.CreateAndNavigateToPageFromUnittestDataDir('blank.html')
+ self.Navigate('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/navigate_unittest.py ('k') | tools/telemetry/telemetry/page/page_test_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698