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

Unified Diff: content/test/gpu/gpu_tests/context_lost.py

Issue 440203002: Merge 283085 "Added more detailed result codes for CreateViewCom..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: 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
« no previous file with comments | « content/test/data/gpu/webgl_with_select_element.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/context_lost.py
===================================================================
--- content/test/gpu/gpu_tests/context_lost.py (revision 287582)
+++ content/test/gpu/gpu_tests/context_lost.py (working copy)
@@ -123,7 +123,22 @@
'window.domAutomationController._succeeded'):
raise page_test.Failure(
'Test failed (context not restored properly?)')
+ else:
+ completed = False
+ try:
+ print "Waiting for page to finish."
+ util.WaitFor(lambda: tab.EvaluateJavaScript(
+ 'window.domAutomationController._finished'), wait_timeout)
+ completed = True
+ except util.TimeoutException:
+ pass
+ if not completed:
+ raise page_test.Failure('Test didn\'t complete')
+ if not tab.EvaluateJavaScript(
+ 'window.domAutomationController._succeeded'):
+ raise page_test.Failure('Test failed')
+
class WebGLContextLostFromGPUProcessExitPage(page.Page):
def __init__(self, page_set, base_dir):
super(WebGLContextLostFromGPUProcessExitPage, self).__init__(
@@ -174,6 +189,22 @@
action_runner.WaitForJavaScriptCondition(
'window.domAutomationController._loaded')
+class WebGLContextLostFromSelectElementPage(page.Page):
+ def __init__(self, page_set, base_dir):
+ super(WebGLContextLostFromSelectElementPage, self).__init__(
+ url='file://webgl_with_select_element.html',
+ page_set=page_set,
+ base_dir=base_dir,
+ name='ContextLost.WebGLContextLostFromSelectElement')
+ self.script_to_evaluate_on_commit = harness_script
+ self.kill_gpu_process = False
+ self.force_garbage_collection = False
+
+ def RunNavigateSteps(self, action_runner):
+ action_runner.NavigateToPage(self)
+ action_runner.WaitForJavaScriptCondition(
+ 'window.domAutomationController._loaded')
+
class ContextLost(test_module.Test):
enabled = True
test = _ContextLostValidator
@@ -188,4 +219,5 @@
ps.AddPage(WebGLContextLostFromGPUProcessExitPage(ps, ps.base_dir))
ps.AddPage(WebGLContextLostFromLoseContextExtensionPage(ps, ps.base_dir))
ps.AddPage(WebGLContextLostFromQuantityPage(ps, ps.base_dir))
+ ps.AddPage(WebGLContextLostFromSelectElementPage(ps, ps.base_dir))
return ps
« no previous file with comments | « content/test/data/gpu/webgl_with_select_element.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698