| 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); | 3484 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); |
| 3485 EXPECT_FALSE(invalid_move.synchronous_handling_disabled()); | 3485 EXPECT_FALSE(invalid_move.synchronous_handling_disabled()); |
| 3486 EXPECT_TRUE(invalid_move.stopped_propagation()); | 3486 EXPECT_TRUE(invalid_move.stopped_propagation()); |
| 3487 } | 3487 } |
| 3488 | 3488 |
| 3489 // Checks key event codes. | 3489 // Checks key event codes. |
| 3490 TEST_F(RenderWidgetHostViewAuraTest, KeyEvent) { | 3490 TEST_F(RenderWidgetHostViewAuraTest, KeyEvent) { |
| 3491 view_->InitAsChild(NULL); | 3491 view_->InitAsChild(NULL); |
| 3492 view_->Show(); | 3492 view_->Show(); |
| 3493 | 3493 |
| 3494 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::DomCode::KEY_A, | 3494 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::DomCode::US_A, |
| 3495 ui::EF_NONE); | 3495 ui::EF_NONE); |
| 3496 view_->OnKeyEvent(&key_event); | 3496 view_->OnKeyEvent(&key_event); |
| 3497 | 3497 |
| 3498 const NativeWebKeyboardEvent* event = delegate_.last_event(); | 3498 const NativeWebKeyboardEvent* event = delegate_.last_event(); |
| 3499 EXPECT_NE(nullptr, event); | 3499 EXPECT_NE(nullptr, event); |
| 3500 if (event) { | 3500 if (event) { |
| 3501 EXPECT_EQ(key_event.key_code(), event->windowsKeyCode); | 3501 EXPECT_EQ(key_event.key_code(), event->windowsKeyCode); |
| 3502 EXPECT_EQ(ui::KeycodeConverter::DomCodeToNativeKeycode(key_event.code()), | 3502 EXPECT_EQ(ui::KeycodeConverter::DomCodeToNativeKeycode(key_event.code()), |
| 3503 event->nativeKeyCode); | 3503 event->nativeKeyCode); |
| 3504 } | 3504 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3638 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3638 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
| 3639 view_->InitAsChild(NULL); | 3639 view_->InitAsChild(NULL); |
| 3640 view_->Show(); | 3640 view_->Show(); |
| 3641 view_->SetSize(size); | 3641 view_->SetSize(size); |
| 3642 view_->OnSwapCompositorFrame(0, | 3642 view_->OnSwapCompositorFrame(0, |
| 3643 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3643 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
| 3644 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3644 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
| 3645 } | 3645 } |
| 3646 | 3646 |
| 3647 } // namespace content | 3647 } // namespace content |
| OLD | NEW |