Commit af25de26 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

fixup! [ozone/wayland] Add clipboard support

This CL is a fixup of [1] and also reverts [2], making
all ozone_unittests run on linux.chromeos bots, without any skips,
for both xdg_v5 and xdg_v6 shell implementations.

Basically, CL brings some important code out of DCHECK. It was
not affecting me locally, because I either build with is_debug
or dcheck_always_on.

[1] https://crrev.com/c/976461
[2] https://crrev.com/c/1027030

R=rjkroege@chromium.org
TEST=ozone_unittests

BUG=578890

Change-Id: I18092d09df85e7aa78b85d208ba372504cd8ede9
Reviewed-on: https://chromium-review.googlesource.com/1028030Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#553650}
parent ae2200a8
......@@ -131,12 +131,10 @@ TEST_P(WaylandDataDeviceManagerTest, IsSelectionOwner) {
ASSERT_FALSE(clipboard_client_->IsSelectionOwner());
}
// TODO(tonikitoo): Deliberately skip running these specific unittests on
// XDG_v5. ChromeOS/Linux builder running on 14.04, which seems to have a
// mis-functioning XDG v5 implementation.
//
// Details:
// https://ci.chromium.org/buildbot/chromium.chromiumos/linux-chromeos-rel/7224
INSTANTIATE_TEST_CASE_P(XdgVersionV5Test,
WaylandDataDeviceManagerTest,
::testing::Values(kXdgShellV5));
INSTANTIATE_TEST_CASE_P(XdgVersionV6Test,
WaylandDataDeviceManagerTest,
::testing::Values(kXdgShellV6));
......
......@@ -58,7 +58,9 @@ void WaylandDataSource::OnSend(void* data,
self->GetClipboardData("text/plain", &mime_data);
std::string contents(mime_data->begin(), mime_data->end());
DCHECK(base::WriteFileDescriptor(fd, contents.data(), contents.length()));
bool result =
base::WriteFileDescriptor(fd, contents.data(), contents.length());
DCHECK(result);
close(fd);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment