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

Unified Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2514243002: Propagates window type properties during aura-mus window creation (Closed)
Patch Set: return 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/mus/window_tree_client_unittest.cc
diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
index e2bd3439f5b28ca727c8ed2682fcd94660a6bf3e..1fbeecc3872938fd0c5416909bb004a76d24a719 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -11,6 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "mojo/common/common_type_converters.h"
#include "services/ui/public/cpp/property_type_converters.h"
+#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/capture_client.h"
@@ -147,6 +148,9 @@ TEST_F(WindowTreeClientWmTest, OnWindowHierarchyChangedWithProperties) {
const uint8_t server_test_property1_value = 91;
data->properties[kTestPropertyServerKey1] =
ConvertToPropertyTransportValue(server_test_property1_value);
+ data->properties[ui::mojom::WindowManager::kWindowType_Property] =
+ mojo::ConvertTo<std::vector<uint8_t>>(
+ static_cast<int32_t>(ui::mojom::WindowType::BUBBLE));
data->parent_id = server_id(root_window());
data->window_id = child_window_id;
data->bounds = gfx::Rect(1, 2, 3, 4);
@@ -161,6 +165,11 @@ TEST_F(WindowTreeClientWmTest, OnWindowHierarchyChangedWithProperties) {
Window* child = root_window()->children()[0];
EXPECT_FALSE(child->TargetVisibility());
EXPECT_EQ(server_test_property1_value, child->GetProperty(kTestPropertyKey1));
+ EXPECT_EQ(child->type(), ui::wm::WINDOW_TYPE_POPUP);
+ client::WindowTypeProperty* window_type_property =
+ child->GetProperty(client::kWindowTypeKey);
+ ASSERT_TRUE(window_type_property);
+ EXPECT_EQ(ui::mojom::WindowType::BUBBLE, window_type_property->type);
}
// Verifies a move from the server doesn't attempt signal the server.

Powered by Google App Engine
This is Rietveld 408576698