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

Side by Side Diff: ui/events/x/events_x_unittest.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <cstring> 5 #include <cstring>
6 #include <set> 6 #include <set>
7 7
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h> 10 #include <X11/Xutil.h>
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 0); 546 0);
547 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev)); 547 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
548 xev.InitGenericKeyEvent(master_device_id, 548 xev.InitGenericKeyEvent(master_device_id,
549 other_device_id, 549 other_device_id,
550 ui::ET_KEY_PRESSED, 550 ui::ET_KEY_PRESSED,
551 ui::VKEY_B, 551 ui::VKEY_B,
552 0); 552 0);
553 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev)); 553 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
554 554
555 device_data_manager->EnableDevice(blocked_device_id); 555 device_data_manager->EnableDevice(blocked_device_id);
556 device_data_manager->SetDisabledKeyboardAllowedKeys( 556 device_data_manager->SetDisabledKeyboardAllowedKeys(nullptr);
557 scoped_ptr<std::set<KeyboardCode> >());
558 557
559 // A key returns KEY_PRESSED as per usual now that keyboard was re-enabled. 558 // A key returns KEY_PRESSED as per usual now that keyboard was re-enabled.
560 xev.InitGenericKeyEvent(master_device_id, 559 xev.InitGenericKeyEvent(master_device_id,
561 blocked_device_id, 560 blocked_device_id,
562 ui::ET_KEY_PRESSED, 561 ui::ET_KEY_PRESSED,
563 ui::VKEY_A, 562 ui::VKEY_A,
564 0); 563 0);
565 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev)); 564 EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
566 } 565 }
567 566
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 KeyEventTestApi test_event(&key_event); 628 KeyEventTestApi test_event(&key_event);
630 test_event.set_is_char(true); 629 test_event.set_is_char(true);
631 } 630 }
632 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY); 631 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY);
633 } 632 }
634 } 633 }
635 } 634 }
636 #endif 635 #endif
637 636
638 } // namespace ui 637 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698