Chromium Code Reviews| Index: ui/file_manager/file_manager/common/js/importer_common_unittest.js |
| diff --git a/ui/file_manager/file_manager/common/js/importer_common_unittest.js b/ui/file_manager/file_manager/common/js/importer_common_unittest.js |
| index 9018108d3f9554563bf1c2aa7f0bfd3f32d11084..ea0e7d6bf3c2bc3e91fc9766f7a844119e856b6b 100644 |
| --- a/ui/file_manager/file_manager/common/js/importer_common_unittest.js |
| +++ b/ui/file_manager/file_manager/common/js/importer_common_unittest.js |
| @@ -223,6 +223,21 @@ function testRotateLogs_RemembersInitialActiveLog(callback) { |
| reportPromise(promise, callback); |
| } |
| +function testDeflateAppUrl() { |
| + var url = 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj' + |
| + '/external/removable/USB%20Drive/DCIM/derekkind2.jpg'; |
| + var deflated = importer.deflateAppUrl(url); |
| + |
| + // Just verify that the string starts with our secret sauce marker... |
| + assertTrue(deflated.substring(0, 1) === '$'); |
|
mtomasz
2015/02/25 00:40:17
nit: assertEquals can be used for better logging.
Steve McKay
2015/02/25 01:51:56
Done.
|
| + |
| + // And that it is shorter than the original... |
| + assertTrue(deflated.length < url.length); |
| + |
| + // And finally that we can reconstitute the original. |
| + assertEquals(importer.inflateAppUrl(deflated), url); |
|
mtomasz
2015/02/25 00:40:17
nit: Opposite order of arguments. Should be assert
Steve McKay
2015/02/25 01:51:56
Done.
|
| +}; |
| + |
| /** @param {string} path */ |
| function assertIsMediaDir(path) { |
| var dir = createDirectoryEntry(sdVolume, path); |