Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / sync / syncable / entry_kernel_unittest.cc
blob55563d5285d3c276d3fa291ee5924e0771ea1a6a
1 // Copyright 2014 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.
5 #include "sync/syncable/entry_kernel.h"
7 #include "testing/gtest/include/gtest/gtest.h"
9 namespace syncer {
11 namespace syncable {
13 class EntryKernelTest : public testing::Test {};
15 TEST_F(EntryKernelTest, ToValue) {
16 EntryKernel kernel;
17 scoped_ptr<base::DictionaryValue> value(kernel.ToValue(NULL));
18 if (value) {
19 // Not much to check without repeating the ToValue() code.
20 EXPECT_TRUE(value->HasKey("isDirty"));
21 // The extra +2 is for "isDirty" and "serverModelType".
22 EXPECT_EQ(BIT_TEMPS_END - BEGIN_FIELDS + 2,
23 static_cast<int>(value->size()));
24 } else {
25 ADD_FAILURE();
29 } // namespace syncable
31 } // namespace syncer