Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/background.js

Issue 288513002: Files.app: Specify a test case name to the test system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698