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

Side by Side Diff: telemetry/examples/browser_tests/simple_browser_test.py

Issue 2562913003: Move browser_test_runner.LoadAllTestsInModule to serially_executed_browser_test_case (Closed)
Patch Set: Fix test Created 4 years 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import sys
5 import os 6 import os
6 7
7 from telemetry.testing import serially_executed_browser_test_case 8 from telemetry.testing import serially_executed_browser_test_case
8 9
9 10
10 def ConvertPathToTestName(url): 11 def ConvertPathToTestName(url):
11 return url.replace('.', '_') 12 return url.replace('.', '_')
12 13
13 14
14 class SimpleBrowserTest( 15 class SimpleBrowserTest(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 self.platform.system_ui.WaitForUiNode(content_desc='History') 59 self.platform.system_ui.WaitForUiNode(content_desc='History')
59 self.platform.system_ui.GetUiNode(content_desc='History').Tap() 60 self.platform.system_ui.GetUiNode(content_desc='History').Tap()
60 # Click on the first entry of the history (page_with_clickables.html) 61 # Click on the first entry of the history (page_with_clickables.html)
61 self.action_runner.WaitForElement('#id-0') 62 self.action_runner.WaitForElement('#id-0')
62 self.action_runner.ClickElement('#id-0') 63 self.action_runner.ClickElement('#id-0')
63 # Verify that the page's js is interactable 64 # Verify that the page's js is interactable
64 self.action_runner.WaitForElement(text='Click/tap me') 65 self.action_runner.WaitForElement(text='Click/tap me')
65 self.action_runner.ExecuteJavaScript('valueSettableByTest = 1997') 66 self.action_runner.ExecuteJavaScript('valueSettableByTest = 1997')
66 self.action_runner.ClickElement(text='Click/tap me') 67 self.action_runner.ClickElement(text='Click/tap me')
67 self.assertEqual(1997, self.action_runner.EvaluateJavaScript('valueToTest')) 68 self.assertEqual(1997, self.action_runner.EvaluateJavaScript('valueToTest'))
69
70
71 def load_tests(loader, tests, pattern):
72 del loader, tests, pattern # Unused.
73 return serially_executed_browser_test_case.LoadAllTestsInModule(
74 sys.modules[__name__])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698