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

Unified Diff: chrome/browser/ui/webui/options2/preferences_browsertest.h

Issue 10834109: Consistently decorate pref values sent to the settings UI code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser test added. Created 8 years, 4 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/browser/ui/webui/options2/preferences_browsertest.h
diff --git a/chrome/browser/ui/webui/options2/preferences_browsertest.h b/chrome/browser/ui/webui/options2/preferences_browsertest.h
new file mode 100644
index 0000000000000000000000000000000000000000..77accd511eb44abbb589e0e23160f3b1ed2f7b91
--- /dev/null
+++ b/chrome/browser/ui/webui/options2/preferences_browsertest.h
@@ -0,0 +1,69 @@
+// Copyright (c) 2012 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.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_PREFERENCES_BROWSERTEST_H_
+#define CHROME_BROWSER_UI_WEBUI_OPTIONS2_PREFERENCES_BROWSERTEST_H_
+
+#include <string>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/policy/mock_configuration_policy_provider.h"
+#include "chrome/browser/policy/policy_constants.h"
+#include "chrome/test/base/in_process_browser_test.h"
+
+namespace base {
+ class DictionaryValue;
James Hawkins 2012/08/07 17:59:05 nit: Forward declarations inside namespaces should
bartfab (slow) 2012/08/07 18:27:05 Done.
+ class Value;
+}
+
+namespace content {
+ class RenderViewHost;
+}
+
+class PreferencesBrowserTest : public InProcessBrowserTest {
James Hawkins 2012/08/07 17:59:05 nit: Document class.
bartfab (slow) 2012/08/07 18:27:05 Done.
+ public:
+ PreferencesBrowserTest();
+
James Hawkins 2012/08/07 17:59:05 nit: // InProcessBrowserTest implementation.
bartfab (slow) 2012/08/07 18:27:05 Done.
+ virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
+ virtual void SetUpOnMainThread() OVERRIDE;
+
+ protected:
+ void VerifyValue(const base::DictionaryValue* dict,
James Hawkins 2012/08/07 17:59:05 nit: Document this block of similar methods.
bartfab (slow) 2012/08/07 18:27:05 Done.
+ const std::string& key,
+ base::Value* expected);
+ void VerifyDict(const base::DictionaryValue* dict,
+ const base::Value* value,
+ const std::string& controlledBy,
+ bool disabled);
+ void VerifyPref(const base::DictionaryValue* prefs,
+ const std::string& name,
+ const base::Value* value,
+ const std::string& controlledBy,
+ bool disabled);
+ void VerifyPrefs(const base::DictionaryValue* prefs,
+ const std::vector<std::string>& names,
+ const std::vector<base::Value*>& values,
+ const std::string& controlledBy,
+ bool disabled);
+ void VerifySetPref(const std::string& name,
+ const std::string& type,
+ base::Value* set_value,
+ base::Value* expected_value);
+
+ void FetchPrefs(const std::vector<std::string>& names,
James Hawkins 2012/08/07 17:59:05 nit: Document method.
bartfab (slow) 2012/08/07 18:27:05 Done.
+ base::DictionaryValue** prefs);
+
+ void SetUserPolicies(const std::vector<std::string>& names,
James Hawkins 2012/08/07 17:59:05 nit: Document method.
bartfab (slow) 2012/08/07 18:27:05 Done.
+ const std::vector<base::Value*>& values,
+ policy::PolicyLevel level);
+
+ void DeleteValues(std::vector<base::Value*>& values);
James Hawkins 2012/08/07 17:59:05 nit: Document method.
bartfab (slow) 2012/08/07 18:27:05 Done.
+
+ content::RenderViewHost* render_view_host_;
James Hawkins 2012/08/07 17:59:05 nit: Document member variable.
bartfab (slow) 2012/08/07 18:27:05 Done.
+
+ policy::MockConfigurationPolicyProvider policy_provider_;
James Hawkins 2012/08/07 17:59:05 nit: Document member variable.
bartfab (slow) 2012/08/07 18:27:05 Done.
+};
James Hawkins 2012/08/07 17:59:05 DISALLOW_COPY_AND_ASSIGN?
bartfab (slow) 2012/08/07 18:27:05 Done.
+
+#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_PREFERENCES_BROWSERTEST_H_

Powered by Google App Engine
This is Rietveld 408576698