OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * Extension ID of Files.app. | 8 * Extension ID of Files.app. |
9 * @type {string} | 9 * @type {string} |
10 * @const | 10 * @const |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // Obtain the root entry paths. | 778 // Obtain the root entry paths. |
779 function(result) { | 779 function(result) { |
780 var roots = JSON.parse(result); | 780 var roots = JSON.parse(result); |
781 RootPath.DOWNLOADS = roots.downloads; | 781 RootPath.DOWNLOADS = roots.downloads; |
782 RootPath.DRIVE = roots.drive; | 782 RootPath.DRIVE = roots.drive; |
783 chrome.test.sendMessage( | 783 chrome.test.sendMessage( |
784 JSON.stringify({name: 'getTestName'}), steps.shift()); | 784 JSON.stringify({name: 'getTestName'}), steps.shift()); |
785 }, | 785 }, |
786 // Run the test case. | 786 // Run the test case. |
787 function(testCaseName) { | 787 function(testCaseName) { |
788 if (!testcase[testCaseName]) { | 788 var targetTest = testcase[testCaseName]; |
789 chrome.test.runTests([function() { | 789 if (!targetTest) { |
790 chrome.test.fail(testCaseName + ' is not found.'); | 790 chrome.test.fail(testCaseName + ' is not found.'); |
791 }]); | |
792 return; | 791 return; |
793 } | 792 } |
794 chrome.test.runTests([testcase[testCaseName]]); | 793 // Specify the name of test to the test system. |
| 794 targetTest.generatedName = testCaseName; |
| 795 chrome.test.runTests([targetTest]); |
795 } | 796 } |
796 ]; | 797 ]; |
797 steps.shift()(); | 798 steps.shift()(); |
798 }); | 799 }); |
OLD | NEW |