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

Side by Side Diff: components/html_viewer/ax_provider_apptest.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 months 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/font_service/font_service_app.cc ('k') | components/html_viewer/blink_text_input_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698