1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 function restoreEntryWorks() {
8 chrome.fileSystem.isRestorable(id, chrome.test.callbackPass(
9 function(isRestorable) {
10 chrome.test.assertTrue(isRestorable);
12 chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
13 function(restoredEntry) {
14 chrome.test.assertTrue(restoredEntry != null);
16 chrome.fileSystem.retainEntry(restoredEntry), id);
17 checkEntry(restoredEntry, 'writable.txt', false /* isNew */,
18 true /*shouldBeWritable */);
20 chrome.fileSystem.isRestorable('wrong id', chrome.test.callbackPass(
21 function(isRestorable) {
22 chrome.test.assertFalse(isRestorable);
24 chrome.fileSystem.restoreEntry('wrong id', chrome.test.callbackFail(