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

Side by Side Diff: chrome/browser/ui/gtk/accelerators_gtk_unittest.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 <gdk/gdkkeysyms.h>
6
7 #include "base/memory/singleton.h"
8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/ui/gtk/accelerators_gtk.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/base/accelerators/platform_accelerator_gtk.h"
12
13 TEST(AcceleratorsGtkTest, GetAccelerator) {
14 AcceleratorsGtk* keymap = AcceleratorsGtk::GetInstance();
15 const ui::Accelerator* accelerator =
16 keymap->GetPrimaryAcceleratorForCommand(IDC_COPY);
17 ASSERT_TRUE(accelerator);
18 EXPECT_EQ(static_cast<guint>(GDK_c),
19 GetGdkKeyCodeForAccelerator(*accelerator));
20 EXPECT_EQ(GDK_CONTROL_MASK, GetGdkModifierForAccelerator(*accelerator));
21 }
22
23 TEST(AcceleratorsGtkTest, GetNullAccelerator) {
24 AcceleratorsGtk* keymap = AcceleratorsGtk::GetInstance();
25 const ui::Accelerator* accelerator =
26 keymap->GetPrimaryAcceleratorForCommand(IDC_MinimumLabelValue - 1);
27 EXPECT_FALSE(accelerator);
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698