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

Unified Diff: components/mus/ws/window_tree_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 side-by-side diff with in-line comments
Download patch
Index: components/mus/ws/window_tree_apptest.cc
diff --git a/components/mus/ws/window_tree_apptest.cc b/components/mus/ws/window_tree_apptest.cc
index da25034f344dcde4523906f2dbe4e57e60d35725..340aa41549f7dd71b8cf04f3ae1439fe4fa4546c 100644
--- a/components/mus/ws/window_tree_apptest.cc
+++ b/components/mus/ws/window_tree_apptest.cc
@@ -26,7 +26,6 @@ using mojo::Callback;
using mojo::InterfaceRequest;
using mojo::RectPtr;
using mojo::String;
-using mus::mojom::ERROR_CODE_NONE;
using mus::mojom::ErrorCode;
using mus::mojom::EventPtr;
using mus::mojom::ViewportMetricsPtr;
@@ -75,7 +74,7 @@ bool EmbedUrl(mojo::ApplicationImpl* app,
mojom::WindowTreeClientPtr client;
app->ConnectToService(url.get(), &client);
ws->Embed(root_id, std::move(client),
- mojom::WindowTree::ACCESS_POLICY_DEFAULT,
+ mojom::WindowTree::kAccessPolicyDefault,
base::Bind(&EmbedCallbackImpl, &run_loop, &result));
}
run_loop.Run();
@@ -87,7 +86,7 @@ bool Embed(WindowTree* ws, Id root_id, mojom::WindowTreeClientPtr client) {
base::RunLoop run_loop;
{
ws->Embed(root_id, std::move(client),
- mojom::WindowTree::ACCESS_POLICY_DEFAULT,
+ mojom::WindowTree::kAccessPolicyDefault,
base::Bind(&EmbedCallbackImpl, &run_loop, &result));
}
run_loop.Run();
@@ -495,8 +494,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase,
Id root_id,
int* connection_id) {
return EstablishConnectionViaEmbedWithPolicyBitmask(
- owner, root_id, mojom::WindowTree::ACCESS_POLICY_DEFAULT,
- connection_id);
+ owner, root_id, mojom::WindowTree::kAccessPolicyDefault, connection_id);
}
scoped_ptr<TestWindowTreeClientImpl>
@@ -943,7 +941,7 @@ TEST_F(WindowTreeAppTest, ReorderWindow) {
{
changes1()->clear();
ASSERT_TRUE(ws_client2()->ReorderWindow(window_2_2, window_2_3,
- mojom::ORDER_DIRECTION_ABOVE));
+ mojom::OrderDirection::ABOVE));
ws_client1_->WaitForChangeCount(1);
EXPECT_EQ("Reordered window=" + IdToString(window_2_2) + " relative=" +
@@ -954,7 +952,7 @@ TEST_F(WindowTreeAppTest, ReorderWindow) {
{
changes1()->clear();
ASSERT_TRUE(ws_client2()->ReorderWindow(window_2_2, window_2_3,
- mojom::ORDER_DIRECTION_BELOW));
+ mojom::OrderDirection::BELOW));
ws_client1_->WaitForChangeCount(1);
EXPECT_EQ("Reordered window=" + IdToString(window_2_2) + " relative=" +
@@ -964,24 +962,24 @@ TEST_F(WindowTreeAppTest, ReorderWindow) {
// view2 is already below view3.
EXPECT_FALSE(ws_client2()->ReorderWindow(window_2_2, window_2_3,
- mojom::ORDER_DIRECTION_BELOW));
+ mojom::OrderDirection::BELOW));
// view4 & 5 are unknown to connection2_.
EXPECT_FALSE(ws_client2()->ReorderWindow(window_1_4, window_1_5,
- mojom::ORDER_DIRECTION_ABOVE));
+ mojom::OrderDirection::ABOVE));
// view6 & view3 have different parents.
EXPECT_FALSE(ws_client1()->ReorderWindow(window_2_3, window_2_6,
- mojom::ORDER_DIRECTION_ABOVE));
+ mojom::OrderDirection::ABOVE));
// Non-existent window-ids
EXPECT_FALSE(ws_client1()->ReorderWindow(BuildWindowId(connection_id_1(), 27),
BuildWindowId(connection_id_1(), 28),
- mojom::ORDER_DIRECTION_ABOVE));
+ mojom::OrderDirection::ABOVE));
// view7 & view8 are un-parented.
EXPECT_FALSE(ws_client1()->ReorderWindow(window_2_7, window_2_8,
- mojom::ORDER_DIRECTION_ABOVE));
+ mojom::OrderDirection::ABOVE));
}
// Verifies DeleteWindow works.
@@ -1420,8 +1418,8 @@ TEST_F(WindowTreeAppTest, SetCursor) {
Id window_1_1 = BuildWindowId(connection_id_1(), 1);
changes2()->clear();
- ASSERT_TRUE(ws_client1()->SetPredefinedCursor(window_1_1,
- mojom::Cursor::CURSOR_IBEAM));
+ ASSERT_TRUE(
+ ws_client1()->SetPredefinedCursor(window_1_1, mojom::Cursor::IBEAM));
ws_client2_->WaitForChangeCount(1u);
EXPECT_EQ("CursorChanged id=" + IdToString(window_1_1) + " cursor_id=4",
@@ -1711,7 +1709,7 @@ TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) {
ws_client1()->AddWindow(BuildWindowId(connection_id_1(), 1), window_1_2));
ASSERT_TRUE(ws_client3_.get() == nullptr);
ws_client3_ = EstablishConnectionViaEmbedWithPolicyBitmask(
- ws1(), window_1_2, mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT, nullptr);
+ ws1(), window_1_2, mojom::WindowTree::kAccessPolicyEmbedRoot, nullptr);
ASSERT_TRUE(ws_client3_.get() != nullptr);
ws_client3_->set_root_window(root_window_id());
« no previous file with comments | « components/mus/ws/window_manager_client_apptest.cc ('k') | components/mus/ws/window_tree_host_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698