Commit 4a4b5e8b authored by kbr@chromium.org's avatar kbr@chromium.org

Revert of Adding test to ensure context restoration due to GC doesn't crash...

Revert of Adding test to ensure context restoration due to GC doesn't crash (https://codereview.chromium.org/251443006/)

Reason for revert:
The new test is failing on multiple GPU bots. Will add links and stack traces to Issue 365747.


Original issue's description:
> Adding 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

TBR=bajones@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=365747

Review URL: https://codereview.chromium.org/258073007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266719 0039d316-1c4b-4281-b951-d872f2087c98
parent 207c0196
...@@ -59,35 +59,6 @@ function testContextRestored() { ...@@ -59,35 +59,6 @@ function testContextRestored() {
window.domAutomationController.send("FAILED"); window.domAutomationController.send("FAILED");
} }
function testQuantityLoss() {
var count = 0;
var iterations = 128;
function createAndDiscardContext() {
count++;
var c = document.createElement("canvas");
c.width = 1;
c.height = 1;
var ctx = c.getContext("experimental-webgl");
if (!ctx) {
return false;
}
ctx.clear(gl.COLOR_BUFFER_BIT);
if (count < iterations) {
window.requestAnimationFrame(createAndDiscardContext);
} else {
window.domAutomationController.setAutomationId(1);
alreadySetAutomationId = true;
window.domAutomationController.send("LOADED");
}
};
createAndDiscardContext();
}
function contextLostTest(kind) function contextLostTest(kind)
{ {
switch (kind) { switch (kind) {
...@@ -108,12 +79,6 @@ function contextLostTest(kind) ...@@ -108,12 +79,6 @@ function contextLostTest(kind)
alreadySetAutomationId = true; alreadySetAutomationId = true;
window.domAutomationController.send("LOADED"); window.domAutomationController.send("LOADED");
break; break;
case "forced_quantity_loss":
// Test creates many new contexts, forcing the original context to be
// lost. Then a garbage collect is triggered and the original context is
// watched to ensure it restores properly.
testQuantityLoss();
break;
} }
} }
......
...@@ -91,26 +91,6 @@ class _ContextLostValidator(page_test.PageTest): ...@@ -91,26 +91,6 @@ class _ContextLostValidator(page_test.PageTest):
raise page_test.Failure( raise page_test.Failure(
'Test failed (context not restored properly?)') '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): class ContextLost(test_module.Test):
enabled = True enabled = True
test = _ContextLostValidator test = _ContextLostValidator
...@@ -134,7 +114,6 @@ class ContextLost(test_module.Test): ...@@ -134,7 +114,6 @@ class ContextLost(test_module.Test):
], ],
'kill_gpu_process': True, 'kill_gpu_process': True,
'number_of_gpu_process_kills': 1, 'number_of_gpu_process_kills': 1,
'force_garbage_collection': False
}, },
{ {
'name': 'ContextLost.WebGLContextLostFromLoseContextExtension', 'name': 'ContextLost.WebGLContextLostFromLoseContextExtension',
...@@ -145,20 +124,7 @@ class ContextLost(test_module.Test): ...@@ -145,20 +124,7 @@ class ContextLost(test_module.Test):
{ 'action': 'wait', { 'action': 'wait',
'javascript': 'window.domAutomationController._finished' } '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
}, },
] ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment