| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "sky/engine/config.h" |
| 6 | 6 |
| 7 #include "platform/TracedValue.h" | 7 #include "sky/engine/platform/TracedValue.h" |
| 8 | 8 |
| 9 #include <gtest/gtest.h> | 9 #include <gtest/gtest.h> |
| 10 | 10 |
| 11 using namespace blink; | 11 using namespace blink; |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 TEST(TracedValueTest, FlatDictionary) | 15 TEST(TracedValueTest, FlatDictionary) |
| 16 { | 16 { |
| 17 RefPtr<TracedValue> value = TracedValue::create(); | 17 RefPtr<TracedValue> value = TracedValue::create(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 value->beginDictionary(); | 42 value->beginDictionary(); |
| 43 value->setInteger("i2", 3); | 43 value->setInteger("i2", 3); |
| 44 value->endDictionary(); | 44 value->endDictionary(); |
| 45 value->endArray(); | 45 value->endArray(); |
| 46 value->setString("s0", "foo"); | 46 value->setString("s0", "foo"); |
| 47 String json = value->asTraceFormat(); | 47 String json = value->asTraceFormat(); |
| 48 EXPECT_EQ("{\"i0\":2014,\"dict1\":{\"i1\":2014,\"dict2\":{\"b2\":false},\"s1
\":\"foo\"},\"d0\":0,\"b0\":true,\"a1\":[1,true,{\"i2\":3}],\"s0\":\"foo\"}", js
on); | 48 EXPECT_EQ("{\"i0\":2014,\"dict1\":{\"i1\":2014,\"dict2\":{\"b2\":false},\"s1
\":\"foo\"},\"d0\":0,\"b0\":true,\"a1\":[1,true,{\"i2\":3}],\"s0\":\"foo\"}", js
on); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } | 51 } |
| OLD | NEW |