Changeset 60693 in webkit
- Timestamp:
- Jun 4, 2010 12:03:45 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60689 r60693 1 2010-06-04 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by David Hyatt. 4 5 Make the editing/spelling/context-menu-suggestions.html test more robust 6 https://bugs.webkit.org/show_bug.cgi?id=40178 7 8 * editing/spelling/context-menu-suggestions-expected.txt: Added. 9 Add new expected test result. 10 11 * editing/spelling/context-menu-suggestions.html: 12 Instead of dumping the menu item titles, check the length and check that the number of items is greater when 13 there are spell checker suggestions. 14 15 * platform/mac-leopard/editing/spelling/context-menu-suggestions-expected.txt: Removed. 16 * platform/mac-snowleopard/editing/spelling/context-menu-suggestions-expected.txt: Removed. 17 * platform/mac-tiger/editing/spelling/context-menu-suggestions-expected.txt: Removed. 18 Remove platform specific versions. 19 1 20 2010-06-04 Dirk Schulze <krit@webkit.org> 2 21 -
trunk/LayoutTests/editing/spelling/context-menu-suggestions.html
r59585 r60693 3 3 To test manually, right click on the text in the input box.</p> 4 4 <input id="input" spellcheck="false" /> 5 <div id="result">FAIL: Did not run test</div> 5 6 </body> 6 7 <script> … … 12 13 var input = document.getElementById("input"); 13 14 input.focus(); 14 document.execCommand("InsertText", false, 'w'); 15 document.execCommand("InsertText", false, 'w'); 15 document.execCommand("InsertText", false, 'wellcome'); 16 16 document.execCommand("InsertText", false, ' '); 17 17 … … 22 22 return; 23 23 24 console.log("Spelling suggestings should NOT be here");25 24 eventSender.mouseMoveTo(x, y); 26 eventSender.contextClick(true);25 var itemNamesWithoutSpellChecking = eventSender.contextClick(); 27 26 28 27 input.setAttribute("spellcheck", "true"); 28 eventSender.mouseMoveTo(x, y); 29 29 30 console.log("Spelling suggestings SHOULD be here"); 31 eventSender.mouseMoveTo(x, y); 32 eventSender.contextClick(true); 30 var itemNamesWithSpellChecking = eventSender.contextClick(); 31 32 if (itemNamesWithSpellChecking.length > itemNamesWithoutSpellChecking.length) 33 document.getElementById('result').innerHTML = 'SUCCESS'; 34 else 35 document.getElementById('result').innerHTML = 'FAILURE: No spell checking suggestions'; 33 36 } 34 37 </script> -
trunk/WebKitTools/ChangeLog
r60690 r60693 1 2010-06-04 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by David Hyatt. 4 5 Make the editing/spelling/context-menu-suggestions.html test more robust 6 https://bugs.webkit.org/show_bug.cgi?id=40178 7 8 Change the contextClick method to return an array of strings describing the context menu items. 9 10 * DumpRenderTree/mac/EventSendingController.mm: 11 (+[EventSendingController isSelectorExcludedFromWebScript:]): 12 (+[EventSendingController webScriptNameForSelector:]): 13 (-[EventSendingController contextClick]): 14 1 15 2010-06-03 Kinuko Yasuda <kinuko@chromium.org> 2 16 -
trunk/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
r59586 r60693 123 123 if (aSelector == @selector(beginDragWithFiles:) 124 124 || aSelector == @selector(clearKillRing) 125 || aSelector == @selector(contextClick :)125 || aSelector == @selector(contextClick) 126 126 || aSelector == @selector(enableDOMUIEventLogging:) 127 127 || aSelector == @selector(fireKeyboardEventsToElement:) … … 153 153 if (aSelector == @selector(beginDragWithFiles:)) 154 154 return @"beginDragWithFiles"; 155 if (aSelector == @selector(contextClick :))155 if (aSelector == @selector(contextClick)) 156 156 return @"contextClick"; 157 157 if (aSelector == @selector(enableDOMUIEventLogging:)) … … 495 495 } 496 496 497 - ( void)contextClick:(BOOL)shouldPrintMenuItems497 - (NSArray *)contextClick 498 498 { 499 499 [[[mainFrame frameView] documentView] layout]; … … 511 511 512 512 NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]]; 513 NSMutableArray *menuItemStrings = [NSMutableArray array]; 514 513 515 if (subView) { 514 516 NSMenu* menu = [subView menuForEvent:event]; 515 if (shouldPrintMenuItems) { 516 printf("ContextMenuItems: "); 517 for (int i = 0; i < [menu numberOfItems]; ++i) { 518 NSMenuItem* menuItem = [menu itemAtIndex:i]; 519 if (!strcmp("Inspect Element", [[menuItem title] UTF8String])) 520 continue; 521 if (i > 0) 522 printf(", "); 523 fputs([menuItem isSeparatorItem] ? "<separator>" : [[menuItem title] UTF8String], stdout); 524 } 525 printf("\n"); 517 518 for (int i = 0; i < [menu numberOfItems]; ++i) { 519 NSMenuItem* menuItem = [menu itemAtIndex:i]; 520 if (!strcmp("Inspect Element", [[menuItem title] UTF8String])) 521 continue; 522 523 if ([menuItem isSeparatorItem]) 524 [menuItemStrings addObject:@"<separator>"]; 525 else 526 [menuItemStrings addObject:[menuItem title]]; 526 527 } 527 528 } 529 530 return menuItemStrings; 528 531 } 529 532
Note: See TracChangeset
for help on using the changeset viewer.