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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/shared_memory.h" | 7 #include "base/shared_memory.h" |
8 #include "base/timer.h" | 8 #include "base/timer.h" |
9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
10 #include "content/browser/renderer_host/backing_store.h" | 10 #include "content/browser/renderer_host/backing_store.h" |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 818 |
819 host_->OnMsgPaintAtSizeAck(kPaintAtSizeTag, gfx::Size(20, 30)); | 819 host_->OnMsgPaintAtSizeAck(kPaintAtSizeTag, gfx::Size(20, 30)); |
820 EXPECT_EQ(host_.get(), observer.host()); | 820 EXPECT_EQ(host_.get(), observer.host()); |
821 EXPECT_EQ(kPaintAtSizeTag, observer.tag()); | 821 EXPECT_EQ(kPaintAtSizeTag, observer.tag()); |
822 EXPECT_EQ(20, observer.size().width()); | 822 EXPECT_EQ(20, observer.size().width()); |
823 EXPECT_EQ(30, observer.size().height()); | 823 EXPECT_EQ(30, observer.size().height()); |
824 } | 824 } |
825 | 825 |
826 // Fails on Linux Aura, see http://crbug.com/100344 | 826 // Fails on Linux Aura, see http://crbug.com/100344 |
827 #if defined(USE_AURA) && !defined(OS_WIN) | 827 #if defined(USE_AURA) && !defined(OS_WIN) |
828 #define MAYBE_HandleKeyEventsWeSent FAILS_HandleKeyEventsWeSent | 828 #define MAYBE_HandleKeyEventsWeSent DISABLED_HandleKeyEventsWeSent |
829 #else | 829 #else |
830 #define MAYBE_HandleKeyEventsWeSent HandleKeyEventsWeSent | 830 #define MAYBE_HandleKeyEventsWeSent HandleKeyEventsWeSent |
831 #endif | 831 #endif |
832 TEST_F(RenderWidgetHostTest, MAYBE_HandleKeyEventsWeSent) { | 832 TEST_F(RenderWidgetHostTest, MAYBE_HandleKeyEventsWeSent) { |
833 // Simulate a keyboard event. | 833 // Simulate a keyboard event. |
834 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); | 834 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); |
835 | 835 |
836 // Make sure we sent the input event to the renderer. | 836 // Make sure we sent the input event to the renderer. |
837 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching( | 837 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching( |
838 ViewMsg_HandleInputEvent::ID)); | 838 ViewMsg_HandleInputEvent::ID)); |
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 process_->InitUpdateRectParams(¶ms); | 1741 process_->InitUpdateRectParams(¶ms); |
1742 params.scale_factor = params.scale_factor * 2; | 1742 params.scale_factor = params.scale_factor * 2; |
1743 | 1743 |
1744 EXPECT_EQ(0, process_->bad_msg_count()); | 1744 EXPECT_EQ(0, process_->bad_msg_count()); |
1745 host_->OnMsgUpdateRect(params); | 1745 host_->OnMsgUpdateRect(params); |
1746 EXPECT_EQ(1, process_->bad_msg_count()); | 1746 EXPECT_EQ(1, process_->bad_msg_count()); |
1747 } | 1747 } |
1748 #endif | 1748 #endif |
1749 | 1749 |
1750 } // namespace content | 1750 } // namespace content |
OLD | NEW |