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

Unified Diff: third_party/WebKit/LayoutTests/inspector/editor/editor-test.js

Issue 2166603002: DevTools: roll CodeMirror (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary typeIn change Created 4 years, 5 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 | third_party/WebKit/Source/devtools/devtools.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/editor/editor-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector/editor/editor-test.js b/third_party/WebKit/LayoutTests/inspector/editor/editor-test.js
index a7ac98b09e04a58f25908c600c50b020935670db..7422b14c4ac16b8e03d7ff8e109054e394c22e5b 100644
--- a/third_party/WebKit/LayoutTests/inspector/editor/editor-test.js
+++ b/third_party/WebKit/LayoutTests/inspector/editor/editor-test.js
@@ -95,7 +95,7 @@ var eventCodes = {
ArrowDown: 40
};
-function createCodeMirrorFakeEvent(eventType, code, charCode, modifiers)
+function createCodeMirrorFakeEvent(editor, eventType, code, charCode, modifiers)
{
function eventPreventDefault()
{
@@ -108,6 +108,7 @@ function createCodeMirrorFakeEvent(eventType, code, charCode, modifiers)
charCode: charCode,
preventDefault: eventPreventDefault,
stopPropagation: function(){},
+ target: editor._codeMirror.display.input.textarea
};
if (modifiers) {
for (var i = 0; i < modifiers.length; ++i)
@@ -118,7 +119,7 @@ function createCodeMirrorFakeEvent(eventType, code, charCode, modifiers)
function fakeCodeMirrorKeyEvent(editor, eventType, code, charCode, modifiers)
{
- var event = createCodeMirrorFakeEvent(eventType, code, charCode, modifiers);
+ var event = createCodeMirrorFakeEvent(editor, eventType, code, charCode, modifiers);
switch(eventType) {
case "keydown":
editor._codeMirror.triggerOnKeyDown(event);
@@ -138,7 +139,7 @@ function fakeCodeMirrorKeyEvent(editor, eventType, code, charCode, modifiers)
function fakeCodeMirrorInputEvent(editor, character)
{
if (typeof character === "string")
- editor._codeMirror.display.input.value += character;
+ editor._codeMirror.display.input.textarea.value += character;
}
InspectorTest.fakeKeyEvent = function(editor, originalCode, modifiers, callback)
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698