| Index: services/ui/public/cpp/tests/window_tree_client_unittest.cc
|
| diff --git a/services/ui/public/cpp/tests/window_tree_client_unittest.cc b/services/ui/public/cpp/tests/window_tree_client_unittest.cc
|
| index 855ad7f1d3548fb016a743be17a45e42a9c6b1ea..2b899c411c2ee5c29ce36f25f911d72211de3810 100644
|
| --- a/services/ui/public/cpp/tests/window_tree_client_unittest.cc
|
| +++ b/services/ui/public/cpp/tests/window_tree_client_unittest.cc
|
| @@ -40,13 +40,8 @@ Id server_id(ui::Window* window) {
|
|
|
| } // namespace
|
|
|
| -mojo::Array<uint8_t> Int32ToPropertyTransportValue(int32_t value) {
|
| - const std::vector<uint8_t> bytes =
|
| - mojo::ConvertTo<std::vector<uint8_t>>(value);
|
| - mojo::Array<uint8_t> transport_value;
|
| - transport_value.resize(bytes.size());
|
| - memcpy(&transport_value.front(), &(bytes.front()), bytes.size());
|
| - return transport_value;
|
| +std::vector<uint8_t> Int32ToPropertyTransportValue(int32_t value) {
|
| + return mojo::ConvertTo<std::vector<uint8_t>>(value);
|
| }
|
|
|
| class TestWindowTreeClientDelegate : public WindowTreeClientDelegate {
|
| @@ -779,8 +774,10 @@ TEST_F(WindowTreeClientTest, NewTopLevelWindowGetsAllChangesInFlight) {
|
| data->window_id = server_id(root2);
|
| data->bounds.SetRect(1, 2, 3, 4);
|
| data->visible = true;
|
| - data->properties["xx"] = mojo::Array<uint8_t>::From(std::string("server_xx"));
|
| - data->properties["yy"] = mojo::Array<uint8_t>::From(std::string("server_yy"));
|
| + data->properties["xx"] =
|
| + mojo::Array<uint8_t>::From(std::string("server_xx")).PassStorage();
|
| + data->properties["yy"] =
|
| + mojo::Array<uint8_t>::From(std::string("server_yy")).PassStorage();
|
| const int64_t display_id = 1;
|
| setup.window_tree_client()->OnTopLevelCreated(
|
| new_window_in_flight_change_id, std::move(data), display_id, true);
|
|
|