OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
6 #include "headless/public/domains/types.h" | 6 #include "headless/public/devtools/domains/accessibility.h" |
| 7 #include "headless/public/devtools/domains/memory.h" |
| 8 #include "headless/public/devtools/domains/page.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
8 | 10 |
9 namespace headless { | 11 namespace headless { |
10 | 12 |
11 TEST(TypesTest, IntegerProperty) { | 13 TEST(TypesTest, IntegerProperty) { |
12 std::unique_ptr<page::NavigateToHistoryEntryParams> object( | 14 std::unique_ptr<page::NavigateToHistoryEntryParams> object( |
13 page::NavigateToHistoryEntryParams::Builder().SetEntryId(123).Build()); | 15 page::NavigateToHistoryEntryParams::Builder().SetEntryId(123).Build()); |
14 EXPECT_TRUE(object); | 16 EXPECT_TRUE(object); |
15 EXPECT_EQ(123, object->GetEntryId()); | 17 EXPECT_EQ(123, object->GetEntryId()); |
16 | 18 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 std::unique_ptr<accessibility::AXValue> clone(object->Clone()); | 207 std::unique_ptr<accessibility::AXValue> clone(object->Clone()); |
206 EXPECT_TRUE(clone); | 208 EXPECT_TRUE(clone); |
207 EXPECT_EQ(base::Value::TYPE_INTEGER, clone->GetValue()->GetType()); | 209 EXPECT_EQ(base::Value::TYPE_INTEGER, clone->GetValue()->GetType()); |
208 | 210 |
209 int clone_value; | 211 int clone_value; |
210 EXPECT_TRUE(clone->GetValue()->GetAsInteger(&clone_value)); | 212 EXPECT_TRUE(clone->GetValue()->GetAsInteger(&clone_value)); |
211 EXPECT_EQ(123, clone_value); | 213 EXPECT_EQ(123, clone_value); |
212 } | 214 } |
213 | 215 |
214 } // namespace headless | 216 } // namespace headless |
OLD | NEW |