Index: chrome/test/data/extensions/api_test/preferences_private/test.js |
diff --git a/chrome/test/data/extensions/api_test/preferences_private/test.js b/chrome/test/data/extensions/api_test/preferences_private/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..06510587f47d657a385f3a15805874ee88c882d0 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/preferences_private/test.js |
@@ -0,0 +1,25 @@ |
+// Copyright 2013 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. |
+ |
+chrome.test.runTests([function() { |
+ chrome.preferencesPrivate.getSyncCategoriesWithoutPassphrase( |
+ function(categories) { |
not at google - send to devlin
2013/12/18 22:30:37
use chrome.test.callbackPass(function(categories)
Rune Fevang
2013/12/19 00:13:43
Done.
|
+ var bookmarks_found = false; |
+ var preferences_found = false; |
+ for (var i = 0; i < categories.length; i++) { |
+ if (categories[i] === "Bookmarks") |
+ bookmarks_found = true; |
+ else if (categories[i] === "Preferences") |
+ preferences_found = true; |
+ else if (categories[i] === "Autofill") |
+ chrome.test.fail("Autofill present even though it's encrypted"); |
+ else if (categories[i] === "Typed URLs") |
+ chrome.test.fail("Typed URLs present even though it's not synced"); |
+ } |
not at google - send to devlin
2013/12/18 22:30:37
Could you do like:
chrome.test.assertTrue(categor
Rune Fevang
2013/12/19 00:13:43
Done, except I don't want to make any assumptions
|
+ chrome.test.assertTrue(bookmarks_found, "Bookmarks is missing."); |
+ chrome.test.assertTrue(preferences_found, "Preferences is missing."); |
+ chrome.test.succeed(); |
not at google - send to devlin
2013/12/18 22:30:37
... and you won't need the succeed() at the end he
Rune Fevang
2013/12/19 00:13:43
Done.
|
+ } |
+ ); |
+}]); |