RESOLVED FIXED 24626
REGRESSION: undo-iframe-location-change.html is failing on the buildbots
https://bugs.webkit.org/show_bug.cgi?id=24626
Summary REGRESSION: undo-iframe-location-change.html is failing on the buildbots
Eric Seidel (no email)
Reported 2009-03-16 13:20:48 PDT
http://build.webkit.org/results/trunk-mac-ppc-release/16864/editing/undo/undo-iframe-location-change-diffs.txt I've debugged it a little. It seems that bool WebEditorClient::canUndo() const { return [[m_webView undoManager] canUndo]; } is actually returning "true". void WebEditorClient::clearUndoRedoOperations() { if (m_haveUndoRedoOperations) { // workaround for <rdar://problem/4645507> NSUndoManager dies // with uncaught exception when undo items cleared while // groups are open NSUndoManager *undoManager = [m_webView undoManager]; int groupingLevel = [undoManager groupingLevel]; for (int i = 0; i < groupingLevel; ++i) [undoManager endUndoGrouping]; [undoManager removeAllActionsWithTarget:m_undoTarget.get()]; for (int i = 0; i < groupingLevel; ++i) [undoManager beginUndoGrouping]; m_haveUndoRedoOperations = NO; ASSERT(![undoManager canUndo]); // I ADDED THIS, IT FAILS! } } Should be called from bool FrameLoader::closeURL() { saveDocumentState(); stopLoading(true); m_frame->editor()->clearUndoRedoOperations(); return true; } which it is, correctly. The problem is that [undoManager canUndo] is still true after calling clearUndoRedoOperations(). The test expects it to be false. Maybe other things in the undo stack (non-editing related) are causing this test to fail? I could change the test to call execCommand("redo") a bunch before running? Maybe that would fix the test failure.
Attachments
Reviewed by Sam Weinig. (1.42 KB, patch)
2009-03-16 13:56 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2009-03-16 13:56:50 PDT
Created attachment 28659 [details] Reviewed by Sam Weinig. REGRESSION: undo-iframe-location-change.html is failing on the buildbots https://bugs.webkit.org/show_bug.cgi?id=24626 Added a call to [[webview undoManager] removeAllActions] to make sure anything left on the undo stack after one test will not affect any later test. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): --- WebKitTools/ChangeLog | 14 ++++++++++++++ WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm | 1 + 2 files changed, 15 insertions(+), 0 deletions(-)
Eric Seidel (no email)
Comment 2 2009-03-16 13:57:13 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebKitTools/ChangeLog M WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm Committed r41740
Note You need to log in before you can comment on or make changes to this bug.