| 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 var EXTENSION_ID = 'kidcpjlbjdmcnmccjhjdckhbngnhnepk'; | 5 var EXTENSION_ID = 'pkplfbidichfdicaijlchgnapepdginl'; |
| 6 var FILE_CONTENTS = 'hello from test extension.'; | 6 var FILE_CONTENTS = 'hello from test extension.'; |
| 7 | 7 |
| 8 function errorCallback(error) { | 8 function errorCallback(error) { |
| 9 var msg = ''; | 9 var msg = ''; |
| 10 if (!error.code) { | 10 if (!error.code) { |
| 11 msg = error.message; | 11 msg = error.message; |
| 12 } else { | 12 } else { |
| 13 switch (error.code) { | 13 switch (error.code) { |
| 14 case FileError.QUOTA_EXCEEDED_ERR: | 14 case FileError.QUOTA_EXCEEDED_ERR: |
| 15 msg = 'QUOTA_EXCEEDED_ERR'; | 15 msg = 'QUOTA_EXCEEDED_ERR'; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // The test expects that selectFile returns failure with an empty entry. | 74 // The test expects that selectFile returns failure with an empty entry. |
| 75 chrome.fileBrowserHandler.selectFile({ suggestedName: 'fail' }, | 75 chrome.fileBrowserHandler.selectFile({ suggestedName: 'fail' }, |
| 76 function(result) { | 76 function(result) { |
| 77 chrome.test.assertTrue(!!result); | 77 chrome.test.assertTrue(!!result); |
| 78 // Entry should be set iff operation succeeded. | 78 // Entry should be set iff operation succeeded. |
| 79 chrome.test.assertEq(false, result.success); | 79 chrome.test.assertEq(false, result.success); |
| 80 chrome.test.assertTrue(result.entry == null); | 80 chrome.test.assertTrue(result.entry == null); |
| 81 chrome.test.succeed(); | 81 chrome.test.succeed(); |
| 82 }); | 82 }); |
| 83 }]); | 83 }]); |
| OLD | NEW |