OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 chrome.test.runTests([ |
| 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( |
| 10 function(id, entry) { |
| 11 otherWindow.close(); |
| 12 chrome.fileSystem.isRestorable(id, chrome.test.callbackPass( |
| 13 function(isRestorable) { |
| 14 chrome.test.assertTrue(isRestorable); |
| 15 })); |
| 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); |
| 20 chrome.test.assertEq( |
| 21 chrome.fileSystem.retainEntry(restoredEntry), id); |
| 22 checkEntry(restoredEntry, 'writable.txt', false /* isNew */, |
| 23 false /*shouldBeWritable */); |
| 24 })); |
| 25 }); |
| 26 })); |
| 27 } |
| 28 ]); |
OLD | NEW |