Bug 993162 - Make default indent size 2 spaces. r=jwalker
☠☠ backed out by dc87f47062ce ☠ ☠
authorHeather Arthur <fayearthur@gmail.com>
Mon, 14 Apr 2014 19:25:00 +0200
changeset 198337 2566c7e54dcfc329337821881d48fddc7584b32f
parent 198336 a253e0f43fe6c1bb52fb8dcbc0d057d92eb6ba79
child 198338 8487d4305be37c0942c43d8e75c0f70b77d0624d
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs993162
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 993162 - Make default indent size 2 spaces. r=jwalker
browser/app/profile/firefox.js
browser/devtools/sourceeditor/test/browser_detectindent.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1278,17 +1278,17 @@ pref("devtools.hud.loglimit.console", 20
 pref("devtools.eyedropper.zoom", 6);
 
 // The developer tools editor configuration:
 // - tabsize: how many spaces to use when a Tab character is displayed.
 // - expandtab: expand Tab characters to spaces.
 // - keymap: which keymap to use (can be 'default', 'emacs' or 'vim')
 // - autoclosebrackets: whether to permit automatic bracket/quote closing.
 // - detectindentation: whether to detect the indentation from the file
-pref("devtools.editor.tabsize", 4);
+pref("devtools.editor.tabsize", 2);
 pref("devtools.editor.expandtab", true);
 pref("devtools.editor.keymap", "default");
 pref("devtools.editor.autoclosebrackets", true);
 pref("devtools.editor.detectindentation", true);
 
 // Enable the Font Inspector
 pref("devtools.fontinspector.enabled", true);
 
--- a/browser/devtools/sourceeditor/test/browser_detectindent.js
+++ b/browser/devtools/sourceeditor/test/browser_detectindent.js
@@ -57,34 +57,34 @@ const TABS_CODE = [
 "}"
 ].join("\n");
 
 
 function test() {
   waitForExplicitFinish();
 
   setup((ed, win) => {
-    is(ed.getOption("indentUnit"), 4,
-       "4 spaces before code added");
+    is(ed.getOption("indentUnit"), 2,
+       "2 spaces before code added");
     is(ed.getOption("indentWithTabs"), false,
        "spaces is default");
 
+    ed.setText(FOUR_SPACES_CODE);
+    is(ed.getOption("indentUnit"), 4,
+       "4 spaces detected in 4 space code");
+    is(ed.getOption("indentWithTabs"), false,
+       "spaces detected in 4 space code");
+
     ed.setText(TWO_SPACES_CODE);
     is(ed.getOption("indentUnit"), 2,
        "2 spaces detected in 2 space code");
     is(ed.getOption("indentWithTabs"), false,
        "spaces detected in 2 space code");
 
-    ed.setText(FOUR_SPACES_CODE);
-    is(ed.getOption("indentUnit"), 4,
-       "4 spaces detected in 4 space code");
-    is(ed.getOption("indentWithTabs"), false,
-       "spaces detected in 4 space code");
-
     ed.setText(TABS_CODE);
-    is(ed.getOption("indentUnit"), 4,
-       "4 space indentation unit");
+    is(ed.getOption("indentUnit"), 2,
+       "2 space indentation unit");
     is(ed.getOption("indentWithTabs"), true,
        "tabs detected in majority tabs code");
 
     teardown(ed, win);
   });
 }