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

Unified Diff: chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/test.js

Issue 11663025: Added JavaScript API Test for getFileSyncStatus() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tzik review #1 Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/test.js
diff --git a/chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/test.js b/chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..556a10b9feb0a0893fa77408612d9b987c0c21aa
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/test.js
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var testStep = [
+ function() {
+ chrome.syncFileSystem.requestFileSystem('drive', testStep.shift());
+ },
+ // Create empty file.
+ function(fileSystem) {
+ fileSystem.root.getFile('Test.txt', {create: true}, testStep.shift(),
+ errorHandler);
+ },
+ // Confirm file is conflicting as this is the mocked value.
+ function(fileEntry) {
+ chrome.syncFileSystem.getFileSyncStatus(fileEntry, testStep.shift());
+ },
+ function(fileSyncStatus) {
+ chrome.test.assertEq("conflicting", fileSyncStatus);
+ chrome.test.succeed();
+ }
+];
+
+function errorHandler(e) {
+ console.log("Failed test with error" + e);
+ chrome.test.fail();
+}
+
+chrome.test.runTests([
+ testStep.shift()
+]);
« no previous file with comments | « chrome/test/data/extensions/api_test/sync_file_system/get_file_sync_status/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698