mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993162 - Make default indent size 2 spaces. r=jwalker
This commit is contained in:
parent
60eb66d64e
commit
b6f37f1c1c
@ -1286,7 +1286,7 @@ pref("devtools.eyedropper.zoom", 6);
|
||||
// - 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);
|
||||
|
@ -52,7 +52,7 @@ function test(){
|
||||
}
|
||||
|
||||
function testSourceIsUgly() {
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
"The source shouldn't be pretty printed yet.");
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ function testAutoPrettyPrintOff(){
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ function test(){
|
||||
}
|
||||
|
||||
function testSourceIsUgly() {
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
"The source shouldn't be pretty printed yet.");
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ function disableAutoPrettyPrint(){
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ function test() {
|
||||
}
|
||||
|
||||
function testSourceIsUgly() {
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
"The source shouldn't be pretty printed yet.");
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ function testProgressBarShown() {
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ function testSourceIsStillPretty() {
|
||||
|
||||
const { source } = gSources.selectedItem.attachment;
|
||||
gDebugger.DebuggerController.SourceScripts.getText(source).then(([, text]) => {
|
||||
ok(text.contains("\n "),
|
||||
ok(text.contains("\n "),
|
||||
"Subsequent calls to getText return the pretty printed source.");
|
||||
deferred.resolve();
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ function selectContextMenuItem() {
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ function test() {
|
||||
}
|
||||
|
||||
function testSourceIsUgly() {
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
"The source shouldn't be pretty printed yet.");
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ function clickPrettyPrintButton() {
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ function test() {
|
||||
}
|
||||
|
||||
function testSourceIsUgly() {
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
ok(!gEditor.getText().contains("\n "),
|
||||
"The source shouldn't be pretty printed yet.");
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ function testProgressBarShown() {
|
||||
}
|
||||
|
||||
function testSourceIsPretty() {
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
ok(gEditor.getText().contains("\n "),
|
||||
"The source should be pretty printed.")
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ function testSourceIsStillPretty() {
|
||||
|
||||
const { source } = gSources.selectedItem.attachment;
|
||||
gDebugger.DebuggerController.SourceScripts.getText(source).then(([, text]) => {
|
||||
ok(text.contains("\n "),
|
||||
ok(text.contains("\n "),
|
||||
"Subsequent calls to getText return the pretty printed source.");
|
||||
deferred.resolve();
|
||||
});
|
||||
|
@ -62,26 +62,26 @@ 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(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(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(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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user