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/domains/types.h" // TODO(altimin): Remove it. |
Sami
2016/11/08 18:58:44
Could we replace these with the individual ones th
altimin
2016/11/08 19:16:58
Done.
| |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace headless { | 9 namespace headless { |
10 | 10 |
11 TEST(TypesTest, IntegerProperty) { | 11 TEST(TypesTest, IntegerProperty) { |
12 std::unique_ptr<page::NavigateToHistoryEntryParams> object( | 12 std::unique_ptr<page::NavigateToHistoryEntryParams> object( |
13 page::NavigateToHistoryEntryParams::Builder().SetEntryId(123).Build()); | 13 page::NavigateToHistoryEntryParams::Builder().SetEntryId(123).Build()); |
14 EXPECT_TRUE(object); | 14 EXPECT_TRUE(object); |
15 EXPECT_EQ(123, object->GetEntryId()); | 15 EXPECT_EQ(123, object->GetEntryId()); |
16 | 16 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 std::unique_ptr<accessibility::AXValue> clone(object->Clone()); | 205 std::unique_ptr<accessibility::AXValue> clone(object->Clone()); |
206 EXPECT_TRUE(clone); | 206 EXPECT_TRUE(clone); |
207 EXPECT_EQ(base::Value::TYPE_INTEGER, clone->GetValue()->GetType()); | 207 EXPECT_EQ(base::Value::TYPE_INTEGER, clone->GetValue()->GetType()); |
208 | 208 |
209 int clone_value; | 209 int clone_value; |
210 EXPECT_TRUE(clone->GetValue()->GetAsInteger(&clone_value)); | 210 EXPECT_TRUE(clone->GetValue()->GetAsInteger(&clone_value)); |
211 EXPECT_EQ(123, clone_value); | 211 EXPECT_EQ(123, clone_value); |
212 } | 212 } |
213 | 213 |
214 } // namespace headless | 214 } // namespace headless |
OLD | NEW |