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

Side by Side Diff: chrome/test/data/extensions/api_test/preferences_private/test.js

Issue 118413003: Add hook for extension to check sync status. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 chrome.test.runTests([function() {
6 chrome.preferencesPrivate.getSyncCategoriesWithoutPassphrase(
7 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.
8 var bookmarks_found = false;
9 var preferences_found = false;
10 for (var i = 0; i < categories.length; i++) {
11 if (categories[i] === "Bookmarks")
12 bookmarks_found = true;
13 else if (categories[i] === "Preferences")
14 preferences_found = true;
15 else if (categories[i] === "Autofill")
16 chrome.test.fail("Autofill present even though it's encrypted");
17 else if (categories[i] === "Typed URLs")
18 chrome.test.fail("Typed URLs present even though it's not synced");
19 }
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
20 chrome.test.assertTrue(bookmarks_found, "Bookmarks is missing.");
21 chrome.test.assertTrue(preferences_found, "Preferences is missing.");
22 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.
23 }
24 );
25 }]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698