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

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

Issue 286203007: [SyncFS] Drop manual conflict resolution policy support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop more unused Created 6 years, 7 months 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
Index: chrome/test/data/extensions/api_test/sync_file_system/conflict_resolution_policy/test.js
diff --git a/chrome/test/data/extensions/api_test/sync_file_system/conflict_resolution_policy/test.js b/chrome/test/data/extensions/api_test/sync_file_system/conflict_resolution_policy/test.js
index 6226198379368e710c8b7d4faabe516854af42c4..30f7e0ddcc3dc5231c70c1facfd9001183d98bb2 100644
--- a/chrome/test/data/extensions/api_test/sync_file_system/conflict_resolution_policy/test.js
+++ b/chrome/test/data/extensions/api_test/sync_file_system/conflict_resolution_policy/test.js
@@ -2,33 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+var callbackPass = chrome.test.callbackPass;
+var callbackFail = chrome.test.callbackFail;
+
var testStep = [
- function testManualPolicy() {
- testConflictResolutionPolicy('manual', testStep.shift());
+ function testNonDefaultConflictResolutionPolicy() {
+ chrome.syncFileSystem.setConflictResolutionPolicy(
+ 'manual',
+ callbackFail('Policy manual is not supported.', testStep.shift()));
+ },
+ function setConflictResolutionPolicy() {
+ chrome.syncFileSystem.setConflictResolutionPolicy(
+ 'last_write_win', callbackPass(testStep.shift()));
},
- function testLastWriteWinPolicy() {
- testConflictResolutionPolicy('last_write_win', chrome.test.callbackPass());
+ function getConflictResolutionPolicy() {
+ chrome.syncFileSystem.getConflictResolutionPolicy(
+ callbackPass(testStep.shift()));
},
+ function checkConflictResolutionPolicy(policy_returned) {
+ chrome.test.assertEq('last_write_win', policy_returned);
+ chrome.test.succeed();
+ }
];
-function testConflictResolutionPolicy(policy, callback) {
- var steps = [
- function setManualPolicy() {
- chrome.syncFileSystem.setConflictResolutionPolicy(
- policy, chrome.test.callbackPass(steps.shift()));
- },
- function getManualPolicy() {
- chrome.syncFileSystem.getConflictResolutionPolicy(
- chrome.test.callbackPass(steps.shift()));
- },
- function checkManualPolicy(policy_returned) {
- chrome.test.assertEq(policy, policy_returned);
- callback();
- }
- ];
- steps.shift()();
-}
-
chrome.test.runTests([
testStep.shift()
]);

Powered by Google App Engine
This is Rietveld 408576698