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

Unified Diff: chrome/test/data/webui/settings/prefs_test_cases.js

Issue 1310843010: Add Polymer tests for cr-settings-prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clarify test Created 5 years, 3 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/webui/settings/prefs_test_cases.js
diff --git a/chrome/test/data/webui/settings/prefs_test_cases.js b/chrome/test/data/webui/settings/prefs_test_cases.js
new file mode 100644
index 0000000000000000000000000000000000000000..3b8cd62b6479745dd6e5fa7eafd845981b9e964b
--- /dev/null
+++ b/chrome/test/data/webui/settings/prefs_test_cases.js
@@ -0,0 +1,38 @@
+// Copyright 2015 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.
+
+/**
+ * @type {Array<{key: string,
+ * type: chrome.settingsPrivate.PrefType,
+ * values: !Array<*>}>}
+ * Test cases containing preference data. Each pref has three test values,
+ * which can be used to change the pref. Intentionally, for a given pref, not
+ * every test value is different from the one before it; this tests what
+ * happens when stale changes are reported.
+ */
+var prefsTestCases = [{
+ key: 'top_level_pref',
+ type: chrome.settingsPrivate.PrefType.BOOLEAN,
+ values: [true, false, true],
+}, {
+ key: 'browser.enable_flash',
+ type: chrome.settingsPrivate.PrefType.BOOLEAN,
+ values: [false, true, false],
+}, {
+ key: 'browser.enable_html5',
+ type: chrome.settingsPrivate.PrefType.BOOLEAN,
+ values: [true, false, false],
+}, {
+ key: 'device.overclock',
+ type: chrome.settingsPrivate.PrefType.NUMBER,
+ values: [0, .2, .6],
+}, {
+ key: 'browser.on.startup.homepage',
+ type: chrome.settingsPrivate.PrefType.STRING,
+ values: ['example.com', 'chromium.org', 'chrome.example.com'],
+}, {
+ key: 'profile.name',
+ type: chrome.settingsPrivate.PrefType.STRING,
+ values: ['Puppy', 'Puppy', 'Horsey'],
+}];

Powered by Google App Engine
This is Rietveld 408576698