|Summary:||DumpRenderTree needs to be able to test Input Method behaviour|
|Product:||WebKit||Reporter:||Oliver Hunt <oliver>|
|Component:||Tools / Tests||Assignee:||Oliver Hunt <oliver>|
|Version:||523.x (Safari 3)|
|OS:||OS X 10.4|
Description Oliver Hunt 2007-07-22 03:35:15 PDT
Due to the continual breakage and unbreakage of Input Methods I have been going mad. We really need some ability to ensure we don't continually regress Input Method behaviour, eg. DRT needs to support IM tests.
Comment 1 Oliver Hunt 2007-07-22 03:45:03 PDT
Created attachment 15617 [details] Woo, an ability to test input method behaviour!!!!!
Comment 2 Alexey Proskuryakov 2007-07-22 04:19:49 PDT
Comment on attachment 15617 [details] Woo, an ability to test input method behaviour!!!!! + * ChangeLog: This needn't be in the ChangeLog. + (-[InputMethodController setIMEFunction:]): I'd call this setIMEventHandler. Generally, it would be nice not to say "IME" in Mac code. Index: DumpRenderTree/InputMethodController.h Would it make sense to implement this within TextInputContoller, which already has NSTextInput methods? We seem to get quite a bit of code duplication. + WebScriptObject *imeFunction; + WebHTMLView *view; Coding style: please prefix Objective-C instance variables with "_". + WebScriptObject *modifiers = [imeFunction evaluateWebScript:@"new Array();"]; I think you can work with an NSArray, and converted to WebScriptObject later - the current code doesn't look nice. Mark had more to say about that on IRC. r- mostly because of code duplication.
Comment 3 Oliver Hunt 2007-07-22 08:15:48 PDT
Created attachment 15622 [details] Mark 2, this time without repeating a lot of code i wish i had realised was there Here we go again
Comment 4 Oliver Hunt 2007-07-22 08:19:24 PDT
Alas I can't use NSDictionary as it doesn't get mapped into a usable JS object, so the Event structure is still a damnable WebScriptObject. I'm thinking the best approach the the IMs is to build up <IMengine.js> for whatever engines we have bugs against, and as time goes by incorporate more of each IMs behaviour into the scripts.
Comment 5 Darin Adler 2007-07-22 08:47:08 PDT
Comment 6 Alexey Proskuryakov 2007-07-22 12:45:11 PDT
A minor comment: earlier NSTextInput tests are in editing/input, I think the test from this patch can go there, too.
Comment 7 Oliver Hunt 2007-07-22 12:51:05 PDT
Landed in r r24517 Without Alexeys test location, as his comment came though just as i committed, is it really worth moving them? :-/
Comment 8 Alexey Proskuryakov 2007-07-22 13:05:45 PDT
Well, there doesn't seem to be any reason to have two directories for these tests :(
Comment 9 Oliver Hunt 2007-07-22 13:07:37 PDT
I have a reason: I can just add the entire inputmethods directory to the windows skiplist In future we may need to have intputmethods/mac and inputmethods/win in which case keeping them isolated will be beneficial
Comment 10 Alexey Proskuryakov 2007-07-22 13:12:04 PDT
Maybe editing/input/mac will do then?
Comment 11 Oliver Hunt 2007-07-22 13:31:31 PDT
I would prefer to keep them completely seperate from the other input methods ... how about events/input (as you say) and events/input/inputengines/<engine, eg. kotoeri>/<platform> If we could come up with someway of getting the right engine for the platform it would be great and then just have a generic test with a non-generic engine implementation...
Comment 12 Alexey Proskuryakov 2007-07-22 13:45:34 PDT
(In reply to comment #11) > events/input (as you say) More precisely, editing/input > and events/input/inputengines/<engine, eg. kotoeri>/<platform> I'm not quite convinced that most of these tests will be engine-based, but I'm OK with trying such a structure.
Comment 13 Oliver Hunt 2007-07-22 13:53:26 PDT
Well i'm assuming that we'll be making tests to ensure we don't regress various IM engines, so engines would contain (for example) kotoeri.js, and hangul.js, because otherwise whenever you want to test something you putting quite a bit of effort just to ensure the rest of the IM behaviour is correct. For now editing/input/mac would do, but i'm trying to think of the future
Comment 14 Oliver Hunt 2007-07-22 14:00:20 PDT
Created attachment 15627 [details] Move current IM tests to editing/input/mac, update skip lists