| 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
|
|
|