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

Side by Side Diff: ui/base/x/x11_util_unittest.cc

Issue 2280433004: Fix missing shadows for tooltip and menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebase Created 4 years, 3 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/environment.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/base/x/x11_util_internal.h"
8 #include "ui/gfx/x/x11_types.h"
9
10 namespace ui {
11
12 class X11UtilTest : public testing::Test {
13 public:
14 X11UtilTest() {}
15 ~X11UtilTest() override {}
16 };
17
18 TEST_F(X11UtilTest, ChooseVisualForWindow) {
19 XDisplay* display = gfx::GetXDisplay();
20 XWindowAttributes windowAttribs;
sadrul 2016/09/02 19:53:24 window_attribs, or just attribs
Julien Isorce Samsung 2016/09/02 20:59:08 Done.
21 Window root = XDefaultRootWindow(display);
22 Status status = XGetWindowAttributes(display, root, &windowAttribs);
23 DCHECK(status != 0);
sadrul 2016/09/02 19:53:24 DCHECK_NE
Julien Isorce Samsung 2016/09/02 20:59:08 Done.
24
25 int depth = 0;
26 bool has_compositing_manager = false;
27 ui::ChooseVisualForWindow(has_compositing_manager, NULL, &depth);
sadrul 2016/09/02 19:53:24 nullptr instead of NULL
Julien Isorce Samsung 2016/09/02 20:59:08 Done.
28 EXPECT_EQ(windowAttribs.depth, depth);
29
30 // Setting to true has no effect because it has been called with false before.
31 has_compositing_manager = true;
32 ui::ChooseVisualForWindow(has_compositing_manager, NULL, &depth);
33 EXPECT_EQ(windowAttribs.depth, depth);
34 }
35
36 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/views/BUILD.gn » ('j') | ui/views/widget/widget_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698