Commit 90f93f30 authored by hirono@chromium.org's avatar hirono@chromium.org

Files.app: Specify a test case name to the test system.

Previously the test system cannot obtain the name of test cases because they are
anonymous inline functions. And it causes a log like "[SUCCESS] undefined".

BUG=372683
TEST=run the tests

Review URL: https://codereview.chromium.org/288513002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270058 0039d316-1c4b-4281-b951-d872f2087c98
parent 747d1833
...@@ -785,13 +785,14 @@ window.addEventListener('load', function() { ...@@ -785,13 +785,14 @@ window.addEventListener('load', function() {
}, },
// Run the test case. // Run the test case.
function(testCaseName) { function(testCaseName) {
if (!testcase[testCaseName]) { var targetTest = testcase[testCaseName];
chrome.test.runTests([function() { if (!targetTest) {
chrome.test.fail(testCaseName + ' is not found.'); chrome.test.fail(testCaseName + ' is not found.');
}]);
return; return;
} }
chrome.test.runTests([testcase[testCaseName]]); // Specify the name of test to the test system.
targetTest.generatedName = testCaseName;
chrome.test.runTests([targetTest]);
} }
]; ];
steps.shift()(); steps.shift()();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment