|
|
Created:
6 years, 8 months ago by bajones Modified:
6 years, 7 months ago Reviewers:
Ken Russell (switch to Gerrit) CC:
chromium-reviews, piman+watch_chromium.org, jam, darin-cc_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionAdding test to ensure context restoration due to GC doesn't crash
BUG=365747
R=kbr@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266696
Patch Set 1 #Patch Set 2 : Rebase #
Messages
Total messages: 19 (0 generated)
PTAL. I wanted to make this a conformance test, but in the end I feel like it's simply too Chrome-specific and relies on forced-GC functionality that we can't reliably access otherwise.
LGTM. Thanks for putting this together. I was going to suggest that the test could be improved by asserting that at least one context was lost before the GC, by setting a state variable in the webglcontextlost event listener, but it's not necessary. The fact that context restoration is verified should be sufficient.
The CQ bit was checked by bajones@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/251443006/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
The CQ bit was checked by bajones@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/251443006/1
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for content/test/gpu/gpu_tests/context_lost.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file content/test/gpu/gpu_tests/context_lost.py Hunk #2 FAILED at 134. 1 out of 3 hunks FAILED -- saving rejects to file content/test/gpu/gpu_tests/context_lost.py.rej Patch: content/test/gpu/gpu_tests/context_lost.py Index: content/test/gpu/gpu_tests/context_lost.py diff --git a/content/test/gpu/gpu_tests/context_lost.py b/content/test/gpu/gpu_tests/context_lost.py index 64e4f5b4dc0890de6f19eed920095b67c41bea58..d096b4206563c8997e0147bfe8115de7fbab439a 100644 --- a/content/test/gpu/gpu_tests/context_lost.py +++ b/content/test/gpu/gpu_tests/context_lost.py @@ -91,6 +91,26 @@ class _ContextLostValidator(page_test.PageTest): raise page_test.Failure( 'Test failed (context not restored properly?)') + elif page.force_garbage_collection: + # Force GC to clean up any contexts not attached to the page. + tab.CollectGarbage() + 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 (no context restored event?)') + if not tab.EvaluateJavaScript( + 'window.domAutomationController._succeeded'): + raise page_test.Failure( + 'Test failed (context not restored properly?)') + class ContextLost(test_module.Test): enabled = True test = _ContextLostValidator @@ -114,6 +134,7 @@ class ContextLost(test_module.Test): ], 'kill_gpu_process': True, 'number_of_gpu_process_kills': 30, + 'force_garbage_collection': False }, { 'name': 'ContextLost.WebGLContextLostFromLoseContextExtension', @@ -124,7 +145,20 @@ class ContextLost(test_module.Test): { 'action': 'wait', 'javascript': 'window.domAutomationController._finished' } ], - 'kill_gpu_process': False + 'kill_gpu_process': False, + 'force_garbage_collection': False + }, + { + 'name': 'ContextLost.WebGLContextLostFromQuantity', + 'url': 'file://webgl.html?query=forced_quantity_loss', + 'script_to_evaluate_on_commit': harness_script, + 'navigate_steps': [ + { 'action': 'navigate' }, + { 'action': 'wait', + 'javascript': 'window.domAutomationController._loaded' } + ], + 'kill_gpu_process': False, + 'force_garbage_collection': True }, ] }
Sorry, I introduced this conflict with my manual dcommit of https://codereview.chromium.org/252793003 .
The CQ bit was checked by bajones@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/251443006/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_gn_rel
The CQ bit was checked by bajones@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/251443006/20001
Message was sent while issue was closed.
Committed patchset #2 manually as r266696 (presubmit successful).
Message was sent while issue was closed.
A revert of this CL has been created in https://codereview.chromium.org/258073007/ by kbr@chromium.org. The reason for reverting is: The new test is failing on multiple GPU bots. Will add links and stack traces to Issue 365747. . |