OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This is a duplicate of the file test_util in | 5 // This is a duplicate of the file test_util in |
6 // chrome/test/data/extensions/api_test/file_system | 6 // chrome/test/data/extensions/api_test/file_system |
7 | 7 |
8 function checkEntry(entry, expectedName, isNew, shouldBeWritable) { | 8 function checkEntry(entry, expectedName, isNew, shouldBeWritable) { |
9 chrome.test.assertEq(expectedName, entry.name); | 9 chrome.test.assertEq(expectedName, entry.name); |
10 // Test that the file can be read. | 10 // Test that the file can be read. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 var blob = new Blob(["HoHoHo!"], {type: "text/plain"}); | 53 var blob = new Blob(["HoHoHo!"], {type: "text/plain"}); |
54 fileWriter.write(blob); | 54 fileWriter.write(blob); |
55 }); | 55 }); |
56 }); | 56 }); |
57 reader.onerror = chrome.test.callback(function(e) { | 57 reader.onerror = chrome.test.callback(function(e) { |
58 chrome.test.fail("Error reading file contents."); | 58 chrome.test.fail("Error reading file contents."); |
59 }); | 59 }); |
60 reader.readAsText(file); | 60 reader.readAsText(file); |
61 })); | 61 })); |
62 } | 62 } |
OLD | NEW |