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

Side by Side Diff: ui/events/test/keyboard_layout.cc

Issue 2197113002: Force U.S. English keyboard layout for TextfieldTest.KeysWithModifiersTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Share keyboard layout selection code between tests Created 4 years, 4 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 "ui/events/test/keyboard_layout.h"
6
7 #if defined(OS_WIN) || defined(OS_MACOSX)
8 #include "base/logging.h"
9
10 namespace ui {
11
12 ScopedKeyboardLayout::ScopedKeyboardLayout(KeyboardLayout layout) {
13 original_layout_ = GetActiveLayout();
14 CHECK(ActivateLayout(GetPlatformKeyboardLayout(layout)));
Peter Kasting 2016/08/18 17:48:19 Nit: We normally use CHECK only for security-sensi
Tomasz Moniuszko 2016/08/26 08:53:12 Done.
15 }
16
17 ScopedKeyboardLayout::~ScopedKeyboardLayout() {
18 ActivateLayout(original_layout_);
19 }
20
21 } // namespace ui
22
23 #endif // defined(OS_WIN) || defined(OS_MACOSX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698