Summary: | Layout tests need a way to disable smart insert or delete | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Glenn Wilson <gwilson> | ||||||||||
Component: | Tools / Tests | Assignee: | Darin Adler <darin> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Minor | CC: | abarth | ||||||||||
Priority: | P4 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 15643 | ||||||||||||
Attachments: |
|
Description
Glenn Wilson
2008-09-04 18:55:07 PDT
Created attachment 23232 [details] Possible fix to bug 20655 Here is a possible fix to this issue. This patch adds a new method to LayoutTestController, "setSmartInsertDeleteEnabled(bool)", which allows the test to set or unset this behavior in the webView. Also added a test that illustrates that when smart editing is disabled, smart deleting behavior changes -- in fact, the test is just one of the smart delete tests modified to have this setting disabled. As far as I can tell, disabling smart editing in one test does not affect others. Tests before and after this test that require smart editing still pass on my system. However, I am only able to test this on a Windows system, so many of the Mac-only layout tests don't run for me regardless. Is there a way for me to try this patch on a publicly available Mac builder, or is there a way that a reviewer help me with this? Comment on attachment 23232 [details] Possible fix to bug 20655 This will break the mac build as you have not included a version of LayoutTestController::setSmartInsertDeleteEnabled for the mac. Created attachment 23308 [details] Possible fix to bug 20655 Here is an improved patch that also modifies the mac/LayoutTestController. Should this also modify the Gtk / Qt versions of LayoutTestController as well? Comment on attachment 23308 [details] Possible fix to bug 20655 oops, found a bug in this... Created attachment 23310 [details]
Possible fix w/ mac support
This should also modify LayoutTestControllerMac.mm...sorry about that.
Do we need to reset the state of smart insert/delete between tests? Comment on attachment 23310 [details]
Possible fix w/ mac support
From just a quick test, yes, it does look like it needs to be reset. Working on an improved patch now...
Created attachment 23362 [details] Possible fix to bug 20655 Here is the fix with a modified DumpRenderTree that resets the smartInsertDeleteEnabled flag to true after each test. I tested this by adding a test that required smart delete that would run last, after the tests that disabled smartInsertDelete. I didn't include this "teardown" test in the patch, though, since it is merely one of the existing smart deleting tests. Will land. My Mac Mini died in the middle of testing this patch. I'm going to take it into the store tomorrow. It's going to be a week before I get my Mac Mini back. Unassigning. I'll land this. |