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