Commit 67aac8cd authored by mtomasz@chromium.org's avatar mtomasz@chromium.org

[fsp] Fix linter issues in JS tests.

This patch fixes random linter issues.

TEST=Cleanup only. All current tests pass.
BUG=393506, 393142

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285868 0039d316-1c4b-4281-b951-d872f2087c98
parent d5cefd68
...@@ -103,6 +103,7 @@ function runTests() { ...@@ -103,6 +103,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// Copy an existing file to a location which already holds a file. // Copy an existing file to a location which already holds a file.
// Should fail. // Should fail.
function copyEntryExistsError() { function copyEntryExistsError() {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @const * @const
*/ */
var TESTING_DIRECTORY = Object.freeze({ var TESTING_DIRECTORY = Object.freeze({
isDirectory: false, isDirectory: true,
name: 'kitty', name: 'kitty',
size: 0, size: 0,
modificationTime: new Date(2014, 4, 28, 10, 39, 15) modificationTime: new Date(2014, 4, 28, 10, 39, 15)
...@@ -80,6 +80,7 @@ function runTests() { ...@@ -80,6 +80,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// Create a directory (exclusive). Should fail, since the directory already // Create a directory (exclusive). Should fail, since the directory already
// exists. // exists.
function createDirectoryErrorExists() { function createDirectoryErrorExists() {
...@@ -92,7 +93,7 @@ function runTests() { ...@@ -92,7 +93,7 @@ function runTests() {
chrome.test.assertEq('InvalidModificationError', error.name); chrome.test.assertEq('InvalidModificationError', error.name);
onSuccess(); onSuccess();
}); });
}, }
]); ]);
} }
......
...@@ -89,6 +89,7 @@ function runTests() { ...@@ -89,6 +89,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// Create a file which exists, non-exclusively. Should succeed. // Create a file which exists, non-exclusively. Should succeed.
function createFileOrOpenSuccess() { function createFileOrOpenSuccess() {
var onSuccess = chrome.test.callbackPass(); var onSuccess = chrome.test.callbackPass();
...@@ -102,6 +103,7 @@ function runTests() { ...@@ -102,6 +103,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// Create a file which exists, exclusively. Should fail. // Create a file which exists, exclusively. Should fail.
function createFileExistsError() { function createFileExistsError() {
var onSuccess = chrome.test.callbackPass(); var onSuccess = chrome.test.callbackPass();
...@@ -113,7 +115,7 @@ function runTests() { ...@@ -113,7 +115,7 @@ function runTests() {
chrome.test.assertEq('InvalidModificationError', error.name); chrome.test.assertEq('InvalidModificationError', error.name);
onSuccess(); onSuccess();
}); });
}, }
]); ]);
} }
......
...@@ -297,7 +297,8 @@ function runTests() { ...@@ -297,7 +297,8 @@ function runTests() {
function(error) { function(error) {
onTestSuccess(); onTestSuccess();
}); });
}, ]); }
]);
} }
// Setup and run all of the test cases. // Setup and run all of the test cases.
......
...@@ -69,7 +69,7 @@ function runTests() { ...@@ -69,7 +69,7 @@ function runTests() {
function(tasks) { function(tasks) {
chrome.test.assertEq(1, tasks.length); chrome.test.assertEq(1, tasks.length);
chrome.test.assertEq( chrome.test.assertEq(
"ddammdhioacbehjngdmkjcjbnfginlla|app|magic_handler", 'ddammdhioacbehjngdmkjcjbnfginlla|app|magic_handler',
tasks[0].taskId); tasks[0].taskId);
onSuccess(); onSuccess();
}); });
...@@ -77,6 +77,7 @@ function runTests() { ...@@ -77,6 +77,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// Confirm, that executing that task, will actually run an OnLaunched event. // Confirm, that executing that task, will actually run an OnLaunched event.
// This is another code path, than collecting tasks (tested above). // This is another code path, than collecting tasks (tested above).
function withMimeExecute() { function withMimeExecute() {
...@@ -88,11 +89,11 @@ function runTests() { ...@@ -88,11 +89,11 @@ function runTests() {
function(tasks) { function(tasks) {
chrome.test.assertEq(1, tasks.length); chrome.test.assertEq(1, tasks.length);
chrome.test.assertEq( chrome.test.assertEq(
"ddammdhioacbehjngdmkjcjbnfginlla|app|magic_handler", 'ddammdhioacbehjngdmkjcjbnfginlla|app|magic_handler',
tasks[0].taskId); tasks[0].taskId);
var onLaunched = function(event) { var onLaunched = function(event) {
chrome.test.assertTrue(!!event); chrome.test.assertTrue(!!event);
chrome.test.assertEq("magic_handler", event.id); chrome.test.assertEq('magic_handler', event.id);
chrome.test.assertTrue(!!event.items); chrome.test.assertTrue(!!event.items);
chrome.test.assertEq(1, event.items.length); chrome.test.assertEq(1, event.items.length);
chrome.test.assertEq( chrome.test.assertEq(
...@@ -111,6 +112,7 @@ function runTests() { ...@@ -111,6 +112,7 @@ function runTests() {
chrome.test.fail(error.name); chrome.test.fail(error.name);
}); });
}, },
// The file without a mime set must not appear on the task list for this // The file without a mime set must not appear on the task list for this
// testing extension. // testing extension.
function withoutMime() { function withoutMime() {
......
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