| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 // Valid WEBP image. | 5 // Valid WEBP image. |
| 6 var validWEBPImageCase = { | 6 var validWEBPImageCase = { |
| 7 filename: "valid.webp", | 7 filename: "valid.webp", |
| 8 blobString: "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" + | 8 blobString: "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" + |
| 9 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" + | 9 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" + |
| 10 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0" | 10 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 reader.onerror = function(e) { | 217 reader.onerror = function(e) { |
| 218 chrome.test.fail("Unable to read test image: " + filename); | 218 chrome.test.fail("Unable to read test image: " + filename); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 reader.readAsArrayBuffer(file); | 221 reader.readAsArrayBuffer(file); |
| 222 } | 222 } |
| 223 | 223 |
| 224 parentDirectoryEntry.getFile(filename, {create: false}, verifyFileEntry, | 224 parentDirectoryEntry.getFile(filename, {create: false}, verifyFileEntry, |
| 225 chrome.test.fail); | 225 chrome.test.fail); |
| 226 } | 226 } |
| 227 | |
| 228 // Create a dummy window to prevent the ProcessManager from suspending the | |
| 229 // chrome-test app. Needed because the writer.onerror and writer.onwriteend | |
| 230 // events do not qualify as pending callbacks, so the app looks dormant. | |
| 231 function CreateDummyWindowToPreventSleep() { | |
| 232 chrome.app.runtime.onLaunched.addListener(function() { | |
| 233 chrome.app.window.create('dummy.html', { | |
| 234 outerBounds: { | |
| 235 width: 800, | |
| 236 height: 600, | |
| 237 left: 100, | |
| 238 top: 100, | |
| 239 minWidth: 800, | |
| 240 minHeight: 600 | |
| 241 } | |
| 242 }); | |
| 243 }); | |
| 244 } | |
| OLD | NEW |