Repository navigation
Conversation
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Editing: manual test for keyboard shortcuts with contenteditable=plaintext-only</title> |
There was a problem hiding this comment.
This comment says "manual test" but the file name doesn't have "-manual" suffix, and this looks like an automated test. Can you verify which this is?
| .keyUp(kControl) | ||
| .send(); | ||
|
|
||
| assert_equals(document.queryCommandState('bold'), false); |
There was a problem hiding this comment.
Comments appreciated. Is the intention the queryCommandState('bold') should be false because the text is already bold by the shortcut?
There was a problem hiding this comment.
It's because for plaintext-only, bold shouldn't work. I'll clarify this in the test name.
| .keyUp(kMeta) | ||
| .send(); | ||
|
|
||
| assert_equals(document.queryCommandState('bold'), false); |
There was a problem hiding this comment.
Comments appreciated. I'm not sure what this is trying to test, Alt+B doesn't do anything, right? Or should it behave as Ctrl+B on some platforms?
There was a problem hiding this comment.
It should be Cmd on macOS. Added a code comment.
|
I guess the issue is that the keyboard shortcut for "bold" is different on different OSes (Command+B on macOS, Ctrl+B on Windows). How should this be tested? Separate subtests or try both in the same subtest? |
I've done the latter. |
|
@kojiishi ping |
See whatwg/html#8275