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

Unified Diff: chrome/browser/chromeos/network_settings/onc_test_utils.h

Issue 10944009: Implementation of ONC signature, validator and normalizer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@gperffix
Patch Set: Addressed remaining nits. Created 8 years, 1 month 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/chromeos/network_settings/onc_test_utils.h
diff --git a/chrome/browser/chromeos/network_settings/onc_test_utils.h b/chrome/browser/chromeos/network_settings/onc_test_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fc836b94d933e405a4372c5a6649d5aeb54fd46
--- /dev/null
+++ b/chrome/browser/chromeos/network_settings/onc_test_utils.h
@@ -0,0 +1,36 @@
+// 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_CHROMEOS_NETWORK_SETTINGS_ONC_TEST_UTILS_H_
+#define CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_TEST_UTILS_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace chromeos {
+namespace onc {
+namespace test_utils {
+
+// Read a JSON dictionary from |filename| and return it as a
+// DictionaryValue. CHECKs if any error occurs.
+scoped_ptr<base::DictionaryValue> ReadTestDictionary(
+ const std::string& filename);
+
+// Checks that the pointer |actual| is not NULL but points to a dictionary that
+// equals |expected| (using Value::Equals). The intended use case is:
+// EXPECT_TRUE(test_utils::Equals(expected, actual));
+::testing::AssertionResult Equals(const base::DictionaryValue* expected,
+ const base::DictionaryValue* actual);
+
+} // namespace test_utils
+} // namespace onc
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_TEST_UTILS_H_
« no previous file with comments | « chrome/browser/chromeos/network_settings/onc_signature.cc ('k') | chrome/browser/chromeos/network_settings/onc_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698