OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 mojo::Array<web_view::mojom::FrameDataPtr> array(1u); | 101 mojo::Array<web_view::mojom::FrameDataPtr> array(1u); |
102 array[0] = web_view::mojom::FrameData::New(); | 102 array[0] = web_view::mojom::FrameData::New(); |
103 array[0]->frame_id = embed_window->id(); | 103 array[0]->frame_id = embed_window->id(); |
104 array[0]->parent_id = 0u; | 104 array[0]->parent_id = 0u; |
105 | 105 |
106 web_view::mojom::FrameClientPtr frame_client; | 106 web_view::mojom::FrameClientPtr frame_client; |
107 connection->ConnectToService(&frame_client); | 107 connection->ConnectToService(&frame_client); |
108 frame_client->OnConnect( | 108 frame_client->OnConnect( |
109 std::move(frame_ptr), 1u, embed_window->id(), | 109 std::move(frame_ptr), 1u, embed_window->id(), |
110 web_view::mojom::WINDOW_CONNECT_TYPE_USE_NEW, std::move(array), | 110 web_view::mojom::WindowConnectType::USE_NEW, std::move(array), |
111 base::TimeTicks::Now().ToInternalValue(), base::Closure()); | 111 base::TimeTicks::Now().ToInternalValue(), base::Closure()); |
112 | 112 |
113 // Connect to the AxProvider of the HTML document and get the AxTree. | 113 // Connect to the AxProvider of the HTML document and get the AxTree. |
114 AxProviderPtr ax_provider; | 114 AxProviderPtr ax_provider; |
115 connection->ConnectToService(&ax_provider); | 115 connection->ConnectToService(&ax_provider); |
116 Array<AxNodePtr> ax_tree; | 116 Array<AxNodePtr> ax_tree; |
117 ax_provider->GetTree([&ax_tree](Array<AxNodePtr> tree) { | 117 ax_provider->GetTree([&ax_tree](Array<AxNodePtr> tree) { |
118 ax_tree = std::move(tree); | 118 ax_tree = std::move(tree); |
119 EXPECT_TRUE(QuitRunLoop()); | 119 EXPECT_TRUE(QuitRunLoop()); |
120 }); | 120 }); |
121 ASSERT_TRUE(DoRunLoopWithTimeout()); | 121 ASSERT_TRUE(DoRunLoopWithTimeout()); |
122 | 122 |
123 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello ")); | 123 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello ")); |
124 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!")); | 124 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!")); |
125 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo")); | 125 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo")); |
126 } | 126 } |
127 | 127 |
128 } // namespace mojo | 128 } // namespace mojo |
OLD | NEW |