Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/file_system/restore_entry/test.js |
| diff --git a/chrome/test/data/extensions/api_test/file_system/restore_entry/test.js b/chrome/test/data/extensions/api_test/file_system/restore_entry/test.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f31aaa6a518822345cdd116fd2dfbd9362d613c0 |
| --- /dev/null |
| +++ b/chrome/test/data/extensions/api_test/file_system/restore_entry/test.js |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +chrome.test.runTests([ |
| + function restoreEntryWorks() { |
| + var id = 'magic id'; |
| + chrome.fileSystem.isRestorable(id, chrome.test.callbackPass( |
| + function(isRestorable) { |
| + chrome.test.assertTrue(isRestorable); |
| + })); |
| + chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass( |
| + function(restoredEntry) { |
| + chrome.test.assertTrue(restoredEntry != null); |
| + chrome.test.assertEq( |
| + chrome.fileSystem.retainEntry(restoredEntry), id); |
| + checkEntry(restoredEntry, 'writable.txt', false /* isNew */, |
| + true /*shouldBeWritable */); |
|
Matt Giuca
2013/05/22 08:26:14
Wrapping. Indent to column 17.
Sam McNally
2013/05/23 03:47:28
Done.
|
| + })); |
| + chrome.fileSystem.isRestorable('wrong id', chrome.test.callbackPass( |
| + function(isRestorable) { |
| + chrome.test.assertFalse(isRestorable); |
| + })); |
| + chrome.fileSystem.restoreEntry('wrong id', chrome.test.callbackFail( |
| + 'Unknown id')); |
| + } |
| +]); |