This source file includes following definitions.
- TEST_F
- TEST_F
#include "sync/js/js_event_details.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
namespace {
class JsEventDetailsTest : public testing::Test {};
TEST_F(JsEventDetailsTest, EmptyList) {
JsEventDetails details;
EXPECT_TRUE(details.Get().empty());
EXPECT_EQ("{}", details.ToString());
}
TEST_F(JsEventDetailsTest, FromDictionary) {
base::DictionaryValue dict;
dict.SetString("foo", "bar");
dict.Set("baz", new base::ListValue());
scoped_ptr<base::DictionaryValue> dict_copy(dict.DeepCopy());
JsEventDetails details(&dict);
EXPECT_TRUE(dict.empty());
EXPECT_TRUE(details.Get().Equals(dict_copy.get()));
}
}
}