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.runtime.getBackgroundPage( | |
8 chrome.test.callbackPass(function(backgroundPage) { | |
9 backgroundPage.callback = chrome.test.callbackPass( | |
koz (OOO until 15th September)
2013/05/24 00:13:16
This callback should go down to where chrome.app.w
Sam McNally
2013/05/24 00:46:03
Done.
| |
10 function(other_window, id, entry) { | |
11 other_window.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 chrome.app.window.create('test_other_window.html'); | |
27 })); | |
28 } | |
29 ]); | |
OLD | NEW |