Home | History | Annotate | Download | only in syncable
      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.
      4 
      5 #include "sync/syncable/entry_kernel.h"
      6 
      7 #include "testing/gtest/include/gtest/gtest.h"
      8 
      9 namespace syncer {
     10 
     11 namespace syncable {
     12 
     13 class EntryKernelTest : public testing::Test {};
     14 
     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();
     26   }
     27 }
     28 
     29 }  // namespace syncable
     30 
     31 }  // namespace syncer
     32