diff options
author | chrishenry@google.com <chrishenry@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 07:00:57 +0000 |
---|---|---|
committer | chrishenry@google.com <chrishenry@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 07:00:57 +0000 |
commit | 64bb94fdffc91abd7ab5c2ba8a1054ff445f1467 (patch) | |
tree | 217cb492058f6448c50089488381a83232341391 /content | |
parent | cb81d40ce0799449a6001c38d14360d07712d8b3 (diff) | |
download | chromium_src-64bb94fdffc91abd7ab5c2ba8a1054ff445f1467.zip chromium_src-64bb94fdffc91abd7ab5c2ba8a1054ff445f1467.tar.gz chromium_src-64bb94fdffc91abd7ab5c2ba8a1054ff445f1467.tar.bz2 |
Add Wait* API to ActionRunner to wrap over WaitAction.
Add ability to wait for an element specified by a JS function.
The ActionRunner API's WaitForElement will not support lookup
by xpath, unlike WaitAction(). Page sets that uses this
feature now have their own _CreateXpathFunction instead,
that uses element_function variant of WaitForElement.
BUG=361809
Review URL: https://codereview.chromium.org/321563003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/test/gpu/gpu_tests/context_lost.py | 14 | ||||
-rw-r--r-- | content/test/gpu/gpu_tests/maps.py | 3 | ||||
-rw-r--r-- | content/test/gpu/gpu_tests/screenshot_sync.py | 5 | ||||
-rw-r--r-- | content/test/gpu/gpu_tests/webgl_conformance.py | 4 | ||||
-rw-r--r-- | content/test/gpu/gpu_tests/webgl_robustness.py | 3 | ||||
-rw-r--r-- | content/test/gpu/page_sets/gpu_process_tests.py | 7 | ||||
-rw-r--r-- | content/test/gpu/page_sets/gpu_rasterization_tests.py | 7 | ||||
-rw-r--r-- | content/test/gpu/page_sets/memory_tests.py | 7 | ||||
-rw-r--r-- | content/test/gpu/page_sets/pixel_tests.py | 7 |
9 files changed, 20 insertions, 37 deletions
diff --git a/content/test/gpu/gpu_tests/context_lost.py b/content/test/gpu/gpu_tests/context_lost.py index a491352..092747a 100644 --- a/content/test/gpu/gpu_tests/context_lost.py +++ b/content/test/gpu/gpu_tests/context_lost.py @@ -138,8 +138,8 @@ class WebGLContextLostFromGPUProcessExitPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - {'javascript': 'window.domAutomationController._loaded'})) + action_runner.WaitForJavaScriptCondition( + 'window.domAutomationController._loaded') class WebGLContextLostFromLoseContextExtensionPage(page.Page): @@ -155,8 +155,8 @@ class WebGLContextLostFromLoseContextExtensionPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - {'javascript': 'window.domAutomationController._finished'})) + action_runner.WaitForJavaScriptCondition( + 'window.domAutomationController._finished') class WebGLContextLostFromQuantityPage(page.Page): def __init__(self, page_set, base_dir): @@ -171,8 +171,8 @@ class WebGLContextLostFromQuantityPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - {'javascript': 'window.domAutomationController._loaded'})) + action_runner.WaitForJavaScriptCondition( + 'window.domAutomationController._loaded') class ContextLost(test_module.Test): enabled = True @@ -189,5 +189,3 @@ class ContextLost(test_module.Test): ps.AddPage(WebGLContextLostFromLoseContextExtensionPage(ps, ps.base_dir)) ps.AddPage(WebGLContextLostFromQuantityPage(ps, ps.base_dir)) return ps - - diff --git a/content/test/gpu/gpu_tests/maps.py b/content/test/gpu/gpu_tests/maps.py index 1d5bb6f..e88b2a5 100644 --- a/content/test/gpu/gpu_tests/maps.py +++ b/content/test/gpu/gpu_tests/maps.py @@ -84,8 +84,7 @@ class MapsPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction({'javascript': 'window.testDone', - 'timeout': 180})) + action_runner.WaitForJavaScriptCondition('window.testDone', timeout=180) class Maps(cloud_storage_test_base.TestBase): diff --git a/content/test/gpu/gpu_tests/screenshot_sync.py b/content/test/gpu/gpu_tests/screenshot_sync.py index 65021b0..d37904b 100644 --- a/content/test/gpu/gpu_tests/screenshot_sync.py +++ b/content/test/gpu/gpu_tests/screenshot_sync.py @@ -38,9 +38,8 @@ class ScreenshotSyncPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction({ - 'javascript': 'window.__testComplete', - 'timeout': 120})) + action_runner.WaitForJavaScriptCondition( + 'window.__testComplete', timeout=120) class ScreenshotSyncProcess(test.Test): diff --git a/content/test/gpu/gpu_tests/webgl_conformance.py b/content/test/gpu/gpu_tests/webgl_conformance.py index f17e970..6da2cb1 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance.py +++ b/content/test/gpu/gpu_tests/webgl_conformance.py @@ -89,8 +89,8 @@ class WebglConformancePage(page_module.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - {'javascript': 'webglTestHarness._finished', 'timeout': 120})) + action_runner.WaitForJavaScriptCondition( + 'webglTestHarness._finished', timeout=120) class WebglConformance(test_module.Test): diff --git a/content/test/gpu/gpu_tests/webgl_robustness.py b/content/test/gpu/gpu_tests/webgl_robustness.py index 1ed3f03..153bd31 100644 --- a/content/test/gpu/gpu_tests/webgl_robustness.py +++ b/content/test/gpu/gpu_tests/webgl_robustness.py @@ -58,8 +58,7 @@ class WebglRobustnessPage(page.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction( - WaitAction({'javascript': 'webglTestHarness._finished'})) + action_runner.WaitForJavaScriptCondition('webglTestHarness._finished') class WebglRobustness(test.Test): test = WebglConformanceValidator diff --git a/content/test/gpu/page_sets/gpu_process_tests.py b/content/test/gpu/page_sets/gpu_process_tests.py index c9abeb0..ee3ee47 100644 --- a/content/test/gpu/page_sets/gpu_process_tests.py +++ b/content/test/gpu/page_sets/gpu_process_tests.py @@ -27,11 +27,8 @@ class FunctionalVideoPage(GpuProcessTestsPage): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - { - 'javascript': 'domAutomationController._finished', - 'timeout': 30 - })) + action_runner.WaitForJavaScriptCondition( + 'domAutomationController._finished', timeout=30) class GpuProcessTestsPageSet(page_set_module.PageSet): diff --git a/content/test/gpu/page_sets/gpu_rasterization_tests.py b/content/test/gpu/page_sets/gpu_rasterization_tests.py index e6a338f..4933302 100644 --- a/content/test/gpu/page_sets/gpu_rasterization_tests.py +++ b/content/test/gpu/page_sets/gpu_rasterization_tests.py @@ -69,11 +69,8 @@ class GpuRasterizationTestsPage(page_module.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - { - 'javascript': 'domAutomationController._finished', - 'timeout': 30 - })) + action_runner.WaitForJavaScriptCondition( + 'domAutomationController._finished', timeout=30) class GpuRasterizationTestsPageSet(page_set_module.PageSet): diff --git a/content/test/gpu/page_sets/memory_tests.py b/content/test/gpu/page_sets/memory_tests.py index dee9c15..ef539c7 100644 --- a/content/test/gpu/page_sets/memory_tests.py +++ b/content/test/gpu/page_sets/memory_tests.py @@ -17,11 +17,8 @@ class MemoryTestsPage(page_module.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - { - 'javascript': 'domAutomationController._finished', - 'timeout': 60 - })) + action_runner.WaitForJavaScriptCondition( + 'domAutomationController._finished', timeout=60) class MemoryTestsPageSet(page_set_module.PageSet): diff --git a/content/test/gpu/page_sets/pixel_tests.py b/content/test/gpu/page_sets/pixel_tests.py index 7d6e33f..720af30 100644 --- a/content/test/gpu/page_sets/pixel_tests.py +++ b/content/test/gpu/page_sets/pixel_tests.py @@ -17,11 +17,8 @@ class PixelTestsPage(page_module.Page): def RunNavigateSteps(self, action_runner): action_runner.NavigateToPage(self) - action_runner.RunAction(WaitAction( - { - 'javascript': 'domAutomationController._finished', - 'timeout': 30 - })) + action_runner.WaitForJavaScriptCondition( + 'domAutomationController._finished', timeout=30) class PixelTestsPageSet(page_set_module.PageSet): |