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

Side by Side Diff: chrome/renderer/render_view_unittest_mac.mm

Issue 387020: Upstreaming WebKit.gyp (Closed)
Patch Set: Created 11 years, 1 month 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/renderer/render_view_unittest.cc ('k') | chrome/renderer/render_widget.h » ('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) 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 #include "webkit/api/public/WebString.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
10 10
11 #include <Cocoa/Cocoa.h> 11 #include <Cocoa/Cocoa.h>
12 #include <Carbon/Carbon.h> // for the kVK_* constants. 12 #include <Carbon/Carbon.h> // for the kVK_* constants.
13 13
14 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) { 14 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) {
15 UniChar uniChar = 0; 15 UniChar uniChar = 0;
16 switch(code) { 16 switch(code) {
17 case kVK_UpArrow: 17 case kVK_UpArrow:
18 uniChar = NSUpArrowFunctionKey; 18 uniChar = NSUpArrowFunctionKey;
19 break; 19 break;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 const char* kArrowUpNoScroll = 127 const char* kArrowUpNoScroll =
128 "38,false,false,true,false\np1\n\np2"; 128 "38,false,false,true,false\np1\n\np2";
129 view_->OnSetEditCommandsForNextKeyEvent( 129 view_->OnSetEditCommandsForNextKeyEvent(
130 EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); 130 EditCommands(1, EditCommand("moveToBeginningOfDocument", "")));
131 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); 131 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
132 output = GetMainFrame()->contentAsText(kMaxOutputCharacters); 132 output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
133 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output)); 133 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output));
134 } 134 }
135 135
OLDNEW
« no previous file with comments | « chrome/renderer/render_view_unittest.cc ('k') | chrome/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698