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

Side by Side Diff: chrome/renderer/render_view_browsertest.cc

Issue 3173044: GTTF: Make our handling of Windows pre-processor symbols more consistent. (Closed)
Patch Set: rebase Created 10 years, 3 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 | « chrome/nacl.gypi ('k') | views/views.gyp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/keyboard_codes.h" 8 #include "base/keyboard_codes.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 break; 488 break;
489 } 489 }
490 } 490 }
491 } 491 }
492 ASSERT_TRUE(!is_white); 492 ASSERT_TRUE(!is_white);
493 } 493 }
494 494
495 // Test that we can receive correct DOM events when we send input events 495 // Test that we can receive correct DOM events when we send input events
496 // through the RenderWidget::OnHandleInputEvent() function. 496 // through the RenderWidget::OnHandleInputEvent() function.
497 TEST_F(RenderViewTest, OnHandleKeyboardEvent) { 497 TEST_F(RenderViewTest, OnHandleKeyboardEvent) {
498 // TODO(phajdan.jr): enable on Window when sprintf is removed. 498 #if defined(OS_WIN) || defined(OS_LINUX)
499 #if defined(OS_LINUX)
500 // Load an HTML page consisting of one <input> element and three 499 // Load an HTML page consisting of one <input> element and three
501 // contentediable <div> elements. 500 // contentediable <div> elements.
502 // The <input> element is used for sending keyboard events, and the <div> 501 // The <input> element is used for sending keyboard events, and the <div>
503 // elements are used for writing DOM events in the following format: 502 // elements are used for writing DOM events in the following format:
504 // "<keyCode>,<shiftKey>,<controlKey>,<altKey>". 503 // "<keyCode>,<shiftKey>,<controlKey>,<altKey>".
505 // TODO(hbono): <http://crbug.com/2215> Our WebKit port set |ev.metaKey| to 504 // TODO(hbono): <http://crbug.com/2215> Our WebKit port set |ev.metaKey| to
506 // true when pressing an alt key, i.e. the |ev.metaKey| value is not 505 // true when pressing an alt key, i.e. the |ev.metaKey| value is not
507 // trustworthy. We will check the |ev.metaKey| value when this issue is fixed. 506 // trustworthy. We will check the |ev.metaKey| value when this issue is fixed.
508 view_->set_send_content_state_immediately(true); 507 view_->set_send_content_state_immediately(true);
509 LoadHTML("<html>" 508 LoadHTML("<html>"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 0); 1082 0);
1084 1083
1085 ProcessPendingMessages(); 1084 ProcessPendingMessages();
1086 const IPC::Message* message2 = render_thread_.sink().GetUniqueMessageMatching( 1085 const IPC::Message* message2 = render_thread_.sink().GetUniqueMessageMatching(
1087 ViewHostMsg_FillAutoFillFormData::ID); 1086 ViewHostMsg_FillAutoFillFormData::ID);
1088 1087
1089 // No message should be sent in this case. |firstname| is filled directly. 1088 // No message should be sent in this case. |firstname| is filled directly.
1090 ASSERT_EQ(static_cast<IPC::Message*>(NULL), message2); 1089 ASSERT_EQ(static_cast<IPC::Message*>(NULL), message2);
1091 EXPECT_EQ(firstname.value(), WebKit::WebString::fromUTF8("David")); 1090 EXPECT_EQ(firstname.value(), WebKit::WebString::fromUTF8("David"));
1092 } 1091 }
OLDNEW
« no previous file with comments | « chrome/nacl.gypi ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698