OLD | NEW |
---|---|
(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 }]); | |
OLD | NEW |