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

Unified Diff: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2_unittest.cc

Issue 1068093002: Refactoring for InputMethodAuraLinux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removes unexpected 229 keydown for non-IME users. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2_unittest.cc
diff --git a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2_unittest.cc b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2_unittest.cc
deleted file mode 100644
index c4612f050fdc368b4c31ae7708714fe66a1ca93c..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2_unittest.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h"
-
-#include "base/strings/utf_string_conversions.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace libgtk2ui {
-
-class X11InputMethodContextImplGtk2FriendTest : public testing::Test {
-};
-
-TEST_F(X11InputMethodContextImplGtk2FriendTest, GtkCommitSignalTrap) {
- libgtk2ui::X11InputMethodContextImplGtk2::GtkCommitSignalTrap trap;
-
- // Test the initial state.
- EXPECT_FALSE(trap.IsSignalCaught());
- EXPECT_FALSE(trap.Trap(base::string16()));
- EXPECT_FALSE(trap.IsSignalCaught());
-
- // Cases which don't match the target keyval.
- trap.StartTrap('t');
- EXPECT_FALSE(trap.Trap(base::UTF8ToUTF16("T")));
- EXPECT_FALSE(trap.IsSignalCaught());
- EXPECT_FALSE(trap.Trap(base::UTF8ToUTF16("true")));
- EXPECT_FALSE(trap.IsSignalCaught());
-
- // Do not catch when the trap is not activated.
- trap.StopTrap();
- EXPECT_FALSE(trap.Trap(base::UTF8ToUTF16("t")));
- EXPECT_FALSE(trap.IsSignalCaught());
-
- // Successive calls don't break anything.
- trap.StopTrap();
- trap.StopTrap();
- EXPECT_FALSE(trap.Trap(base::UTF8ToUTF16("t")));
- EXPECT_FALSE(trap.IsSignalCaught());
- trap.StartTrap('f');
- trap.StartTrap('t');
- EXPECT_TRUE(trap.Trap(base::UTF8ToUTF16("t")));
- EXPECT_TRUE(trap.IsSignalCaught());
-
- // StartTrap() resets the state.
- trap.StartTrap('t');
- EXPECT_FALSE(trap.IsSignalCaught());
- // Many times calls to Trap() are okay.
- EXPECT_FALSE(trap.Trap(base::UTF8ToUTF16("f")));
- EXPECT_FALSE(trap.IsSignalCaught());
- EXPECT_TRUE(trap.Trap(base::UTF8ToUTF16("t")));
- EXPECT_TRUE(trap.IsSignalCaught());
-}
-
-} // namespace libgtk2ui

Powered by Google App Engine
This is Rietveld 408576698