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

Unified Diff: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js

Issue 1208423005: [DevTools] Add test checking that codemirror-based highlighter is loaded. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « LayoutTests/inspector/editor/php-highlighter-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index a01ac5e079b1be234d130ac3d6b6208a6a4e499a..b0735d6d5da928a1e7b9913c3108a850bcaff22c 100644
--- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -939,7 +939,13 @@ WebInspector.CodeMirrorTextEditor.prototype = {
else if (whitespaceMode === "trailing")
mimeType = this._trailingWhitespaceOverlayMode(this._mimeType);
this._codeMirror.setOption("mode", mimeType);
- WebInspector.CodeMirrorTextEditor._loadMimeTypeModes(this._mimeType, this._updateCodeMirrorMode.bind(this));
+ WebInspector.CodeMirrorTextEditor._loadMimeTypeModes(this._mimeType, this._mimeTypeModesLoaded.bind(this));
+ },
+
+ _mimeTypeModesLoaded: function()
+ {
+ // Do not remove, this function is sniffed in tests.
+ this._updateCodeMirrorMode();
},
/**
« no previous file with comments | « LayoutTests/inspector/editor/php-highlighter-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698