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() |
+]); |