Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: headless/public/domains/types_unittest.cc

Issue 2473073003: [headless] Refactor headless devtools client API. (Closed)
Patch Set: Address nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « headless/public/domains/README.md ('k') | headless/public/internal/value_conversions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « headless/public/domains/README.md ('k') | headless/public/internal/value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698