| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/gtk/event_utils.h" | 5 #include "chrome/browser/ui/gtk/event_utils.h" |
| 6 | 6 |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "ui/base/events.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/base/events/event_constants.h" |
| 10 | 10 |
| 11 namespace event_utils { | 11 namespace event_utils { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 const guint states[] = { | 15 const guint states[] = { |
| 16 GDK_LOCK_MASK, | 16 GDK_LOCK_MASK, |
| 17 GDK_CONTROL_MASK, | 17 GDK_CONTROL_MASK, |
| 18 GDK_SHIFT_MASK, | 18 GDK_SHIFT_MASK, |
| 19 GDK_MOD1_MASK, | 19 GDK_MOD1_MASK, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 48 for (int j = i + 1; j < size; ++j) { | 48 for (int j = i + 1; j < size; ++j) { |
| 49 SCOPED_TRACE(base::StringPrintf( | 49 SCOPED_TRACE(base::StringPrintf( |
| 50 "Checking EventFlagsFromGdkState: i = %d, j = %d", i, j)); | 50 "Checking EventFlagsFromGdkState: i = %d, j = %d", i, j)); |
| 51 EXPECT_EQ(flags[i] | flags[j], | 51 EXPECT_EQ(flags[i] | flags[j], |
| 52 EventFlagsFromGdkState(states[i] | states[j])); | 52 EventFlagsFromGdkState(states[i] | states[j])); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace event_utils | 57 } // namespace event_utils |
| OLD | NEW |