Commit fed4d2d9 authored by yosin's avatar yosin Committed by Commit bot

Convert editing/deleting/delete-all-text-in-text-field-assertion.html to use w3c test harness

This patch converts "editing/deleting/delete-all-text-in-text-field-assertion.html"
to use w3c test harness to simplify test script for improving readability.

BUG=n/a
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2276563005
Cr-Commit-Position: refs/heads/master@{#414346}
parent dded34e9
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
Bug 9358: REGRESSION: Assertion failure in HTMLInputElement::setValueFromRenderer (value == constrainValue(value)) when deleting all text
https://bugs.webkit.org/show_bug.cgi?id=9358
Assertion fails when all characters are deleted:
SUCCESS if the test didn't crash and you see this message.
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
</script>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
</script>
<script src="../editing.js"></script>
</head>
<body>
<div>Bug 9358: REGRESSION: Assertion failure in HTMLInputElement::setValueFromRenderer (value == constrainValue(value)) when deleting all text</div>
<div><a href="https://bugs.webkit.org/show_bug.cgi?id=9358">https://bugs.webkit.org/show_bug.cgi?id=9358</a></div>
<div><br></div>
<form>
Assertion fails when all characters are deleted: <input type="text" id="t" value="X">
</form>
<script>
document.getElementById("t").focus();
document.execCommand("SelectAll");
document.execCommand("Delete");
</script>
<div>SUCCESS if the test didn't crash and you see this message.</div>
<script>
if (window.testRunner) {
testRunner.notifyDone()
}
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<input id="sample" value="foo bar">
<script>
test(() => {
var sample = document.getElementById('sample');
sample.focus();
document.execCommand('selectAll');
document.execCommand('delete');
assert_equals(sample.value, '');
}, 'document.execCommand works with INPUT');
</script>
<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