Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: LayoutTests/inspector/editor/text-editor-word-jumps.html

Issue 357483007: DevTools: [CodeMirror] add support for camel case movements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use nice naming for shift-movement Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/editor/text-editor-word-jumps-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/editor/text-editor-word-jumps.html
diff --git a/LayoutTests/inspector/editor/text-editor-word-jumps.html b/LayoutTests/inspector/editor/text-editor-word-jumps.html
index 2c704ecd80f3560fdafc0e1ec36934a1dcd6e1e8..e38696b8e52b9da3f673668ef62b29a6ed2baf1d 100644
--- a/LayoutTests/inspector/editor/text-editor-word-jumps.html
+++ b/LayoutTests/inspector/editor/text-editor-word-jumps.html
@@ -12,6 +12,14 @@ function testFunction(foo, bar)
return a === 1 ? true : false;
}
+function testMyCamelMove(foo, bar)
+{
+ /* HelloWorld.TestSTRIng */
+
+ var a = e === 2;
+{}
+}
+
var textEditor = InspectorTest.createTestEditor();
textEditor.setMimeType("text/javascript");
textEditor.setReadOnly(false);
@@ -20,6 +28,7 @@ function testFunction(foo, bar)
InspectorTest.addResult(textEditor.text());
const wordJumpModifier = WebInspector.isMac() ? "altKey" : "ctrlKey";
+ const camelJumpModifier = WebInspector.isMac() ? "ctrlKey" : "altKey";
function dumpEditorSelection()
{
@@ -106,6 +115,36 @@ function testFunction(foo, bar)
next();
}
InspectorTest.fakeKeyEvent(textEditor, "\b", [wordJumpModifier], eventCallback);
+ },
+
+ function testAltRight(next)
+ {
+ InspectorTest.addResult("====== CAMEL CASE MOVEMENTS ======");
+ textEditor.setText(testMyCamelMove.toString());
+ setCursorAtBeginning();
+ dumpEditorSelection();
+ fireEventWhileSelectionChanges("rightArrow", [camelJumpModifier], next);
+ },
+
+ function testAltLeft(next)
+ {
+ setCursorAtEnd();
+ dumpEditorSelection();
+ fireEventWhileSelectionChanges("leftArrow", [camelJumpModifier], next);
+ },
+
+ function testAltShiftRight(next)
+ {
+ setCursorAtBeginning();
+ dumpEditorSelection();
+ fireEventWhileSelectionChanges("rightArrow", [camelJumpModifier, "shiftKey"], next);
+ },
+
+ function testAltShiftLeft(next)
+ {
+ setCursorAtEnd();
+ dumpEditorSelection();
+ fireEventWhileSelectionChanges("leftArrow", [camelJumpModifier, "shiftKey"], next);
}
]);
@@ -116,7 +155,7 @@ function testFunction(foo, bar)
<body onload="runTest();">
<p>
-This test checks how text editor handles different ctrl-based movements, i.e. ctrl-left, ctrl-right, ctrl-shift-left, ctrl-backspace.
+This test checks how text editor handles different movements: ctrl-left, ctrl-right, ctrl-shift-left, ctrl-backspace, alt-left, alt-right, alt-shift-left, alt-shift-right.
</p>
</body>
« no previous file with comments | « no previous file | LayoutTests/inspector/editor/text-editor-word-jumps-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698