Skip to content

Commit

Permalink
[Win] editing/selection/caret-rtl-right.html is randomly failing
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=262460

Reviewed by Don Olmstead.

The following tests were randomly failing becuase a click sometimes
dispatched a double-click event.

  editing/deleting/smart-delete-001.html
  editing/deleting/smart-delete-003.html
  editing/deleting/smart-delete-004.html
  editing/selection/5057506.html
  editing/selection/caret-ltr-right.html
  editing/selection/caret-rtl-right.html

Reset the mouse position after the previous test not to dispatch a
fake double-click event for a click in the next page.

* LayoutTests/platform/wincairo/TestExpectations:
* LayoutTests/platform/wincairo/editing/deleting/smart-delete-004-expected.txt:
* Tools/WebKitTestRunner/win/TestControllerWin.cpp:

Canonical link: https://commits.webkit.org/269217@main
  • Loading branch information
fujii committed Oct 11, 2023
1 parent b0bf5bc commit d68b953
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 0 additions & 4 deletions LayoutTests/platform/wincairo/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1172,10 +1172,6 @@ editing/selection/regional-indicators.html [ Skip ]
[ Debug ] editing/selection/move-by-character-brute-force.html [ Skip ]
[ Debug ] editing/selection/move-by-word-visually-crash-test-5.html [ Skip ]

webkit.org/b/262460 editing/selection/caret-rtl-right.html [ Failure Pass ]
webkit.org/b/262460 editing/selection/caret-ltr-right.html [ Failure Pass ]
webkit.org/b/262460 editing/selection/5057506.html [ Failure Pass ]

###### Command enabling
webkit.org/b/101539 editing/execCommand/switch-list-type-with-orphaned-li.html [ Failure ]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
This tests deleting a selection created with a word granularity. To run it manually, double click on 'bar' and hit forward delete. You should see 'foo baz'.

Expected Results:
The second word and the space before the second word should be deleted. It should like this this:
foo baz

foo baz

3 changes: 3 additions & 0 deletions Tools/WebKitTestRunner/win/TestControllerWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "config.h"
#include "TestController.h"

#include "EventSenderProxy.h"
#include <WebCore/NotImplemented.h>
#include <WinBase.h>
#include <fcntl.h>
Expand Down Expand Up @@ -220,6 +221,8 @@ void TestController::platformConfigureViewForTest(const TestInvocation&)

bool TestController::platformResetStateToConsistentValues(const TestOptions&)
{
// Reset the mouse position not to dispatch a fake double-click event for a click in the next page.
m_eventSenderProxy->mouseMoveTo(0, 0, nullptr);
return true;
}

Expand Down

0 comments on commit d68b953

Please sign in to comment.