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

Side by Side Diff: content/renderer/render_view_browsertest_mac.mm

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.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) 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/string_util.h" 5 #include "base/string_util.h"
6 #include "base/string16.h" 6 #include "base/string16.h"
7 #include "content/public/browser/native_web_keyboard_event.h" 7 #include "content/public/browser/native_web_keyboard_event.h"
8 #include "content/public/test/render_view_test.h" 8 #include "content/public/test/render_view_test.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 #include <Cocoa/Cocoa.h> 12 #include <Cocoa/Cocoa.h>
13 #include <Carbon/Carbon.h> // for the kVK_* constants. 13 #include <Carbon/Carbon.h> // for the kVK_* constants.
14 14
15 using content::NativeWebKeyboardEvent; 15 namespace content {
16 using content::RenderViewTest;
17 16
18 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) { 17 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) {
19 UniChar uniChar = 0; 18 UniChar uniChar = 0;
20 switch(code) { 19 switch(code) {
21 case kVK_UpArrow: 20 case kVK_UpArrow:
22 uniChar = NSUpArrowFunctionKey; 21 uniChar = NSUpArrowFunctionKey;
23 break; 22 break;
24 case kVK_DownArrow: 23 case kVK_DownArrow:
25 uniChar = NSDownArrowFunctionKey; 24 uniChar = NSDownArrowFunctionKey;
26 break; 25 break;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const char* kArrowUpNoScroll = 139 const char* kArrowUpNoScroll =
141 "38,false,false,true,false\np1\n\np2"; 140 "38,false,false,true,false\np1\n\np2";
142 view->OnSetEditCommandsForNextKeyEvent( 141 view->OnSetEditCommandsForNextKeyEvent(
143 EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); 142 EditCommands(1, EditCommand("moveToBeginningOfDocument", "")));
144 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); 143 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
145 ProcessPendingMessages(); 144 ProcessPendingMessages();
146 output = GetMainFrame()->contentAsText(kMaxOutputCharacters); 145 output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
147 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output)); 146 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output));
148 } 147 }
149 148
149 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698