forked from BrowserWorks/Waterfox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1561435 - Format xpcom/, a=automatic-formatting
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35945 --HG-- extra : source : 5a77e5b70e89a23705d3767c223420be2587ae0e
- Loading branch information
Victor Porof
committed
Jul 17, 2019
1 parent
16bc84f
commit f0f66bc
Showing
40 changed files
with
996 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ module.exports = { | |
"overrides": [{ | ||
"files": [ | ||
"devtools/**", | ||
"xpcom/**", | ||
"xpfe/**", | ||
], | ||
"rules": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,45 @@ | ||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); | ||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); | ||
|
||
var nameArray = [ | ||
"ascii", // ASCII | ||
"fran\u00E7ais", // Latin-1 | ||
"\u0420\u0443\u0441\u0441\u043A\u0438\u0439", // Cyrillic | ||
"\u65E5\u672C\u8A9E", // Japanese | ||
"\u4E2D\u6587", // Chinese | ||
"\uD55C\uAD6D\uC5B4", // Korean | ||
"\uD801\uDC0F\uD801\uDC2D\uD801\uDC3B\uD801\uDC2B", // Deseret | ||
"ascii", // ASCII | ||
"fran\u00E7ais", // Latin-1 | ||
"\u0420\u0443\u0441\u0441\u043A\u0438\u0439", // Cyrillic | ||
"\u65E5\u672C\u8A9E", // Japanese | ||
"\u4E2D\u6587", // Chinese | ||
"\uD55C\uAD6D\uC5B4", // Korean | ||
"\uD801\uDC0F\uD801\uDC2D\uD801\uDC3B\uD801\uDC2B", // Deseret | ||
]; | ||
|
||
function getTempDir() { | ||
return Services.dirsvc.get("TmpD", Ci.nsIFile); | ||
return Services.dirsvc.get("TmpD", Ci.nsIFile); | ||
} | ||
|
||
function create_file(fileName) { | ||
var outFile = getTempDir(); | ||
outFile.append(fileName); | ||
outFile.createUnique(outFile.NORMAL_FILE_TYPE, 0o600); | ||
var outFile = getTempDir(); | ||
outFile.append(fileName); | ||
outFile.createUnique(outFile.NORMAL_FILE_TYPE, 0o600); | ||
|
||
var stream = Cc["@mozilla.org/network/file-output-stream;1"] | ||
.createInstance(Ci.nsIFileOutputStream); | ||
stream.init(outFile, 0x02 | 0x08 | 0x20, 0o600, 0); | ||
stream.write("foo", 3); | ||
stream.close(); | ||
var stream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance( | ||
Ci.nsIFileOutputStream | ||
); | ||
stream.init(outFile, 0x02 | 0x08 | 0x20, 0o600, 0); | ||
stream.write("foo", 3); | ||
stream.close(); | ||
|
||
Assert.equal(outFile.leafName.substr(0, fileName.length), fileName); | ||
Assert.equal(outFile.leafName.substr(0, fileName.length), fileName); | ||
|
||
return outFile; | ||
return outFile; | ||
} | ||
|
||
function test_create(fileName) { | ||
var file1 = create_file(fileName); | ||
var file2 = create_file(fileName); | ||
file1.remove(false); | ||
file2.remove(false); | ||
var file1 = create_file(fileName); | ||
var file2 = create_file(fileName); | ||
file1.remove(false); | ||
file2.remove(false); | ||
} | ||
|
||
function run_test() { | ||
for (var i = 0; i < nameArray.length; ++i) { | ||
test_create(nameArray[i]); | ||
} | ||
for (var i = 0; i < nameArray.length; ++i) { | ||
test_create(nameArray[i]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.