Bug 998065 - Added 0o prefix to octal numbers; r=froydnj
authorVikneshwar <lviknesh1993@gmail.com>
Tue, 22 Apr 2014 11:53:00 +0200
changeset 179825 f63f6fb5e5af887f94f6b4501caef042fbbefd12
parent 179824 fcdca8a9cda165112f8762cc77e03f25446d8c12
child 179826 ecdb94250102f1483c999b2baa931da7d5518859
push id6474
push usercbook@mozilla.com
push dateThu, 24 Apr 2014 08:27:59 +0000
treeherderfx-team@f63f6fb5e5af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs998065
milestone31.0a1
Bug 998065 - Added 0o prefix to octal numbers; r=froydnj
browser/devtools/scratchpad/test/browser_scratchpad_recent_files.js
browser/devtools/scratchpad/test/browser_scratchpad_reset_undo.js
browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js
--- a/browser/devtools/scratchpad/test/browser_scratchpad_recent_files.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_recent_files.js
@@ -188,23 +188,23 @@ function testClearedAll()
 
   finishTest();
 }
 
 function createAndLoadTemporaryFile(aFile, aFileName, aFileContent)
 {
   // Create a temporary file.
   aFile = FileUtils.getFile("TmpD", [aFileName]);
-  aFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
+  aFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
 
   // Write the temporary file.
   let fout = Cc["@mozilla.org/network/file-output-stream;1"].
              createInstance(Ci.nsIFileOutputStream);
   fout.init(aFile.QueryInterface(Ci.nsILocalFile), 0x02 | 0x08 | 0x20,
-            0644, fout.DEFER_OPEN);
+            0o644, fout.DEFER_OPEN);
 
   gScratchpad.setFilename(aFile.path);
   gScratchpad.importFromFile(aFile.QueryInterface(Ci.nsILocalFile),  true,
                             fileImported);
   gScratchpad.saveFile(fileSaved);
 
   return aFile;
 }
--- a/browser/devtools/scratchpad/test/browser_scratchpad_reset_undo.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_reset_undo.js
@@ -40,31 +40,31 @@ function test()
 }
 
 function runTests()
 {
   gScratchpad = gScratchpadWindow.Scratchpad;
 
   // Create a temporary file.
   gFileA = FileUtils.getFile("TmpD", ["fileAForBug684546.tmp"]);
-  gFileA.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
+  gFileA.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
 
   gFileB = FileUtils.getFile("TmpD", ["fileBForBug684546.tmp"]);
-  gFileB.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
+  gFileB.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
 
   // Write the temporary file.
   let foutA = Cc["@mozilla.org/network/file-output-stream;1"].
              createInstance(Ci.nsIFileOutputStream);
   foutA.init(gFileA.QueryInterface(Ci.nsILocalFile), 0x02 | 0x08 | 0x20,
-            0644, foutA.DEFER_OPEN);
+            0o644, foutA.DEFER_OPEN);
 
   let foutB = Cc["@mozilla.org/network/file-output-stream;1"].
              createInstance(Ci.nsIFileOutputStream);
   foutB.init(gFileB.QueryInterface(Ci.nsILocalFile), 0x02 | 0x08 | 0x20,
-            0644, foutB.DEFER_OPEN);
+            0o644, foutB.DEFER_OPEN);
 
   let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
                   createInstance(Ci.nsIScriptableUnicodeConverter);
   converter.charset = "UTF-8";
   let fileContentStreamA = converter.convertToInputStream(gFileAContent);
   let fileContentStreamB = converter.convertToInputStream(gFileBContent);
 
   NetUtil.asyncCopy(fileContentStreamA, foutA, tempFileSaved);
--- a/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js
@@ -93,23 +93,23 @@ function testAfterSecondRevert() {
   gFile = gScratchpad = menu = null;
   finish();
 }
 
 function createAndLoadTemporaryFile()
 {
   // Create a temporary file.
   gFile = FileUtils.getFile("TmpD", [gFileName]);
-  gFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
+  gFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
 
   // Write the temporary file.
   let fout = Cc["@mozilla.org/network/file-output-stream;1"].
              createInstance(Ci.nsIFileOutputStream);
   fout.init(gFile.QueryInterface(Ci.nsILocalFile), 0x02 | 0x08 | 0x20,
-            0644, fout.DEFER_OPEN);
+            0o644, fout.DEFER_OPEN);
 
   let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
                   createInstance(Ci.nsIScriptableUnicodeConverter);
   converter.charset = "UTF-8";
   let fileContentStream = converter.convertToInputStream(gFileContent);
 
   NetUtil.asyncCopy(fileContentStream, fout, tempFileSaved);
 }