Commit df67f133 authored by ap@webkit.org's avatar ap@webkit.org

Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=20366
        Reproducible test failure for editing/undo/undo-iframe-location-change.html

        This does not fix the problem, but makes the test more predictable by using iframe onload.
        Also, makes the test runnable in browser. Turns out that the test reliably fails there too,
        even without any special steps needed in DRT.

        * editing/undo/undo-iframe-location-change-expected.txt:
        * editing/undo/undo-iframe-location-change.html:

        * ChangeLog-2007-10-14: Added bug URLs for a patch that included this test.

WebCore:
        * ChangeLog-2006-05-10: Added bug URLs for a fix that included this test.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 80c76ce7
2008-09-28 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=20366
Reproducible test failure for editing/undo/undo-iframe-location-change.html
This does not fix the problem, but makes the test more predictable by using iframe onload.
Also, makes the test runnable in browser. Turns out that the test reliably fails there too,
even without any special steps needed in DRT.
* editing/undo/undo-iframe-location-change-expected.txt:
* editing/undo/undo-iframe-location-change.html:
* ChangeLog-2007-10-14: Added bug URLs for a patch that included this test.
2008-09-27 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Sam Weinig.
......
......@@ -57145,8 +57145,8 @@ text-clip was an incorrect test, rather than an incorrect result
Reviewed by mjs
<http://tinymce.moxiecode.com/example_full.php?example=true>
TinyMCE: Undo still enabled after a location change, crashes if performed
https://bugs.webkit.org/show_bug.cgi?id=7150
<rdar://4433765> TinyMCE: Undo still enabled after a location change, crashes if performed
* editing/undo/undo-iframe-location-change-expected.txt: Added.
* editing/undo/undo-iframe-location-change.html: Added.
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 1 of #text > BODY > HTML > #document to 1 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
Success
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<script src="../editing.js"></script>
<iframe name="iframe" src="../resources/contenteditable-iframe-src.html"></iframe>
<iframe name="iframe" src="../resources/contenteditable-iframe-src.html" onload="runTest()"></iframe>
<ul id="console"></ul>
<script>
......@@ -17,43 +12,53 @@ function log(message) {
}
function part1() {
// Hack to focus the frame, should be able to do frames['iframe'].focus()
eventSender.mouseMoveTo(50, 50);
eventSender.mouseDown();
eventSender.mouseUp();
frames['iframe'].document.body.focus();
// Hack to perform the editing command. Should be able to
// call execCommand on the main document.
frames['iframe'].document.execCommand('InsertText', false, 'c');
if (frames['iframe'].document.body.innerText != 'c') {
log("FAIL: could not insert text.");
if (window.layoutTestController)
layoutTestController.notifyDone();
return;
}
if (!document.queryCommandEnabled('Undo')) {
log("FAIL: Undo is not enabled after text insertion.");
if (window.layoutTestController)
layoutTestController.notifyDone();
return;
}
window.location = window.location.toString() + "?part2";
}
function part2() {
if (frames['iframe'].document.body.innerText != '')
log("FAIL: subframe still has old content after navigaiton.");
if (!document.queryCommandEnabled('Undo'))
log("Success");
else
log("Failure, Undo was still enabled after the location changed.");
log("Failure, Undo was still enabled after the location changed (but at least we didn't crash!)");
window.layoutTestController.notifyDone();
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function runTest() {
if (!window.layoutTestController)
return;
if (window.location.toString().indexOf("?part2") == -1) {
window.layoutTestController.waitUntilDone();
window.layoutTestController.dumpAsText();
// Give the iframe a moment to come into being.
window.setTimeout(part1, 100);
part1();
} else {
part2();
}
}
runTest();
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.dumpAsText();
}
</script>
\ No newline at end of file
</script>
2008-09-28 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=20366
Reproducible test failure for editing/undo/undo-iframe-location-change.html
* ChangeLog-2006-05-10: Added bug URLs for a fix that included this test.
2008-09-28 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig (except for a few comment and header tweaks).
......
......@@ -16749,8 +16749,8 @@
Reviewed by mjs
<http://tinymce.moxiecode.com/example_full.php?example=true>
TinyMCE: Undo still enabled after a location change, crashes if performed
https://bugs.webkit.org/show_bug.cgi?id=7150
<rdar://4433765> TinyMCE: Undo still enabled after a location change, crashes if performed
Can't clear undo/redo operations registered by subframes in didOpenURL,
because subframes have already been detached.
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