| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This test file checks if we can read the expected contents | 5 // This test file checks if we can read the expected contents |
| 6 // (kExpectedContents) from the target file (kFileName). We will try to read | 6 // (kExpectedContents) from the target file (kFileName). We will try to read |
| 7 // the file directly, and using a filesystem handler | 7 // the file directly, and using a filesystem handler |
| 8 // (chorme/test/data/extensions/api_test/filesystem_handler/). What's | 8 // (chorme/test/data/extensions/api_test/filesystem_handler/). What's |
| 9 // interesting is that we'll read the file via a remote mount point. | 9 // interesting is that we'll read the file via a remote mount point. |
| 10 // See external_filesystem_apitest.cc for how this is set up. | 10 // See external_filesystem_apitest.cc for how this is set up. |
| 11 | 11 |
| 12 // These should match the counterparts in feeds used in | 12 // These should match the counterparts in feeds used in |
| 13 // external_filesystem_apitest.cc. | 13 // external_filesystem_apitest.cc. |
| 14 // The feeds are located in chrome/test/data/chromeos/drive/. | 14 // The feeds are located in chrome/test/data/chromeos/drive/. |
| 15 var kDirectoryPath = 'drive/Folder'; | 15 var kDirectoryPath = 'drive/Folder'; |
| 16 var kFileName = 'File.aBc'; | 16 var kFileName = 'File.aBc'; |
| 17 var kExpectedContents = 'hello, world\0'; | 17 var kExpectedContents = 'hello, world!'; |
| 18 var kWriteOffset = 12; | 18 var kWriteOffset = 12; |
| 19 var kWriteData = '!!!'; | 19 var kWriteData = '!!!'; |
| 20 var kExpectedAfterWrite = 'hello, world!!!'; | 20 var kExpectedAfterWrite = 'hello, world!!!'; |
| 21 var kTruncateShortLength = 5; | 21 var kTruncateShortLength = 5; |
| 22 var kExpectedAfterTruncateShort = 'hello'; | 22 var kExpectedAfterTruncateShort = 'hello'; |
| 23 var kTruncateLongLength = 7; | 23 var kTruncateLongLength = 7; |
| 24 var kExpectedAfterTruncateLong = 'hello\0\0'; | 24 var kExpectedAfterTruncateLong = 'hello\0\0'; |
| 25 var kNewDirectoryPath = 'drive/FolderNew'; | 25 var kNewDirectoryPath = 'drive/FolderNew'; |
| 26 var kFileManagerExtensionId = 'hhaomjibdihmijegdhdafkllkbggdgoj'; | 26 var kFileManagerExtensionId = 'hhaomjibdihmijegdhdafkllkbggdgoj'; |
| 27 | 27 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 testRunner.runCancelTest(kFileName, 'write'); | 300 testRunner.runCancelTest(kFileName, 'write'); |
| 301 }, | 301 }, |
| 302 function cancelTruncate() { | 302 function cancelTruncate() { |
| 303 testRunner.runCancelTest(kFileName, 'truncate'); | 303 testRunner.runCancelTest(kFileName, 'truncate'); |
| 304 }, | 304 }, |
| 305 function createDir() { | 305 function createDir() { |
| 306 // Creates new directory. | 306 // Creates new directory. |
| 307 testRunner.runGetDirTest(kNewDirectoryPath, true); | 307 testRunner.runGetDirTest(kNewDirectoryPath, true); |
| 308 }, | 308 }, |
| 309 ]); | 309 ]); |
| OLD | NEW |