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 retainEntryWorks() {
7 chrome.app.window.create('test_other_window.html', chrome.test.callbackPass(
8 function(otherWindow) {
9 otherWindow.contentWindow.callback = chrome.test.callbackPass(
12 chrome.fileSystem.isRestorable(id, chrome.test.callbackPass(
13 function(isRestorable) {
14 chrome.test.assertTrue(isRestorable);
16 chrome.test.assertEq(chrome.fileSystem.retainEntry(entry), id);
17 chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
18 function(restoredEntry) {
19 chrome.test.assertEq(restoredEntry, entry);
21 chrome.fileSystem.retainEntry(restoredEntry), id);
22 checkEntry(restoredEntry, 'writable.txt', false /* isNew */,
23 false /*shouldBeWritable */);