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 "mojo/ui/associates/view_inspector_client.h" | 5 #include "mojo/ui/associates/view_inspector_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "mojo/public/cpp/application/application_impl.h" | |
11 #include "mojo/public/cpp/application/application_test_base.h" | 10 #include "mojo/public/cpp/application/application_test_base.h" |
12 #include "mojo/ui/associates/mock_view_inspector.h" | 11 #include "mojo/ui/associates/mock_view_inspector.h" |
13 #include "mojo/ui/associates/test_helpers.h" | 12 #include "mojo/ui/associates/test_helpers.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 namespace test { | 15 namespace test { |
17 | 16 |
18 class ViewInspectorClientTest : public mojo::test::ApplicationTestBase { | 17 class ViewInspectorClientTest : public mojo::test::ApplicationTestBase { |
19 public: | 18 public: |
20 ViewInspectorClientTest() : view_inspector_binding_(&view_inspector_) {} | 19 ViewInspectorClientTest() : view_inspector_binding_(&view_inspector_) {} |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 EXPECT_NE(nullptr, resolved_hits->result()); | 139 EXPECT_NE(nullptr, resolved_hits->result()); |
141 EXPECT_EQ(2u, resolved_hits->map().size()); | 140 EXPECT_EQ(2u, resolved_hits->map().size()); |
142 EXPECT_TRUE( | 141 EXPECT_TRUE( |
143 view_token_11.Equals(resolved_hits->map().at(scene_token_1->value))); | 142 view_token_11.Equals(resolved_hits->map().at(scene_token_1->value))); |
144 EXPECT_TRUE( | 143 EXPECT_TRUE( |
145 view_token_33.Equals(resolved_hits->map().at(scene_token_3->value))); | 144 view_token_33.Equals(resolved_hits->map().at(scene_token_3->value))); |
146 EXPECT_EQ(1u, view_inspector_.scene_lookups()); | 145 EXPECT_EQ(1u, view_inspector_.scene_lookups()); |
147 } | 146 } |
148 | 147 |
149 } // namespace test | 148 } // namespace test |
OLD | NEW |