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

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

Issue 2473073003: [headless] Refactor headless devtools client API. (Closed)
Patch Set: Address comments from skyostil@. 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/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
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
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