| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/common/native_web_keyboard_event.h" | 5 #include "chrome/common/native_web_keyboard_event.h" |
| 6 #include "chrome/common/render_messages.h" | 6 #include "chrome/common/render_messages.h" |
| 7 #include "chrome/test/render_view_test.h" | 7 #include "chrome/test/render_view_test.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 TEST_F(RenderViewTest, OnLoadAlternateHTMLText) { | 10 TEST_F(RenderViewTest, OnLoadAlternateHTMLText) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 &post_page_count_param); | 298 &post_page_count_param); |
| 299 EXPECT_EQ(1, post_page_count_param.b); | 299 EXPECT_EQ(1, post_page_count_param.b); |
| 300 | 300 |
| 301 // Verify the rendered "printed page". | 301 // Verify the rendered "printed page". |
| 302 const IPC::Message* did_print_msg = | 302 const IPC::Message* did_print_msg = |
| 303 render_thread_.sink().GetUniqueMessageMatching( | 303 render_thread_.sink().GetUniqueMessageMatching( |
| 304 ViewHostMsg_DidPrintPage::ID); | 304 ViewHostMsg_DidPrintPage::ID); |
| 305 EXPECT_TRUE(did_print_msg); | 305 EXPECT_TRUE(did_print_msg); |
| 306 ViewHostMsg_DidPrintPage::Param post_did_print_page_param; | 306 ViewHostMsg_DidPrintPage::Param post_did_print_page_param; |
| 307 ViewHostMsg_DidPrintPage::Read(did_print_msg, &post_did_print_page_param); | 307 ViewHostMsg_DidPrintPage::Read(did_print_msg, &post_did_print_page_param); |
| 308 EXPECT_EQ(0, post_did_print_page_param.page_number); | 308 EXPECT_EQ(0, post_did_print_page_param.a.page_number); |
| 309 #else | 309 #else |
| 310 NOTIMPLEMENTED(); | 310 NOTIMPLEMENTED(); |
| 311 #endif | 311 #endif |
| 312 } | 312 } |
| 313 | 313 |
| 314 // Test that we can receive correct DOM events when we send input events | 314 // Test that we can receive correct DOM events when we send input events |
| 315 // through the RenderWidget::OnHandleInputEvent() function. | 315 // through the RenderWidget::OnHandleInputEvent() function. |
| 316 TEST_F(RenderViewTest, OnHandleKeyboardEvent) { | 316 TEST_F(RenderViewTest, OnHandleKeyboardEvent) { |
| 317 #if defined(OS_WIN) | 317 #if defined(OS_WIN) |
| 318 // Load an HTML page consisting of one <input> element and three | 318 // Load an HTML page consisting of one <input> element and three |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 // modifier-key status. | 647 // modifier-key status. |
| 648 const int kMaxOutputCharacters = 4096; | 648 const int kMaxOutputCharacters = 4096; |
| 649 std::wstring output; | 649 std::wstring output; |
| 650 GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); | 650 GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); |
| 651 EXPECT_EQ(kLayouts[i].expected_result, output); | 651 EXPECT_EQ(kLayouts[i].expected_result, output); |
| 652 } | 652 } |
| 653 #else | 653 #else |
| 654 NOTIMPLEMENTED(); | 654 NOTIMPLEMENTED(); |
| 655 #endif | 655 #endif |
| 656 } | 656 } |
| OLD | NEW |