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

Side by Side Diff: chrome/browser/chromeos/network_settings/onc_normalizer_unittest.cc

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/network_settings/onc_normalizer.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h"
9 #include "chrome/browser/chromeos/network_settings/onc_signature.h"
10 #include "chrome/browser/chromeos/network_settings/onc_test_utils.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace chromeos {
14 namespace onc {
15
16 // This test case is about validating valid ONC objects.
17 TEST(ONCNormalizerTest, NormalizeNetworkConfiguration) {
18 Normalizer normalizer(true);
19 scoped_ptr<const base::DictionaryValue> data(
20 test_utils::ReadTestDictionary("settings_with_normalization.json"));
21
22 const base::DictionaryValue* original;
23 const base::DictionaryValue* expected_normalized;
24 data->GetDictionary("ethernet-and-vpn", &original);
25 data->GetDictionary("ethernet-and-vpn-normalized", &expected_normalized);
26
27 scoped_ptr<base::DictionaryValue> actual_normalized =
28 normalizer.NormalizeObject(&kNetworkConfigurationSignature, *original);
29 EXPECT_TRUE(test_utils::Equals(expected_normalized, actual_normalized.get()));
30 }
31
32 } // namespace onc
33 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_settings/onc_normalizer.cc ('k') | chrome/browser/chromeos/network_settings/onc_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698