Commit 74095815 authored by yoichio@chromium.org's avatar yoichio@chromium.org

Clean up a crash test case.

What we expect this case is just stability so output string itself is not related to test input.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169640 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7454d3be
Should not crash if we load a test case from crbug.com/344280.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS event.data is "FINISH"
PASS Did not crash.
PASS successfullyParsed is true
TEST COMPLETE
aa
<!DOCTYPE html>
<html>
<head>
<title>Crash issue 344280</title>
<title>Issue 344280</title>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description('Should not crash if we load a test case from crbug.com/344280.');
window.jsTestIsAsync = true;
document.addEventListener("DOMContentLoaded", function () {
document.execCommand("SelectAll", false);
window.getSelection().deleteFromDocument();
}, true);
window.addEventListener('message', didReceiveMessage, false);
var iframe = document.createElement('iframe');
iframe.src = 'resources/insert-ordered-list-crash-iframe.html';
document.body.appendChild(iframe);
var count = 0;
document.addEventListener("DOMSubtreeModified", function () {
count++;
if (count < 3) {
var src = event.srcElement;
src.contentEditable = "true";
src.innerHTML = '<div></div>';
document.execCommand('InsertOrderedList', false, false);
} else if (count == 3) {
window.finishJSTest();
}
}, false);
function didReceiveMessage(event) {
shouldBeEqualToString('event.data', 'FINISH');
document.body.removeChild(iframe);
testPassed('Did not crash.');
window.finishJSTest();
}
</script>
<h5>
aa
<textarea></textarea>
</h5>
<dl>
aa
</dl>
</body>
</html>
<html>
<body>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.execCommand("SelectAll", false);
window.getSelection().deleteFromDocument();
window.parent.postMessage('FINISH', '*');
}, true);
var count = 0;
document.addEventListener("DOMSubtreeModified", function () {
count++;
if (count < 3) {
var src = event.srcElement;
src.contentEditable = "true";
src.innerHTML = '<div></div>';
document.execCommand('InsertOrderedList', false, false);
}
}, false);
</script>
<h5>
aa
<textarea></textarea>
</h5>
<dl>
aa
</dl>
</body>
</html>
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