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

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

Issue 357203003: Move webpreferences.* from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android fix - webview() -> web_view Created 6 years, 5 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/pepper/ppb_graphics_3d_impl.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/strings/string16.h" 5 #include "base/strings/string16.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/public/browser/native_web_keyboard_event.h" 8 #include "content/public/browser/native_web_keyboard_event.h"
9 #include "content/public/common/web_preferences.h"
9 #include "content/public/test/render_view_test.h" 10 #include "content/public/test/render_view_test.h"
10 #include "content/renderer/render_view_impl.h" 11 #include "content/renderer/render_view_impl.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/web/WebLocalFrame.h" 13 #include "third_party/WebKit/public/web/WebLocalFrame.h"
13 #include "webkit/common/webpreferences.h"
14 14
15 #include <Carbon/Carbon.h> // for the kVK_* constants.
15 #include <Cocoa/Cocoa.h> 16 #include <Cocoa/Cocoa.h>
16 #include <Carbon/Carbon.h> // for the kVK_* constants.
17 17
18 namespace content { 18 namespace content {
19 19
20 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) { 20 NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) {
21 UniChar uniChar = 0; 21 UniChar uniChar = 0;
22 switch(code) { 22 switch(code) {
23 case kVK_UpArrow: 23 case kVK_UpArrow:
24 uniChar = NSUpArrowFunctionKey; 24 uniChar = NSUpArrowFunctionKey;
25 break; 25 break;
26 case kVK_DownArrow: 26 case kVK_DownArrow:
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 view->OnSetEditCommandsForNextKeyEvent( 134 view->OnSetEditCommandsForNextKeyEvent(
135 EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); 135 EditCommands(1, EditCommand("moveToBeginningOfDocument", "")));
136 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); 136 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
137 ProcessPendingMessages(); 137 ProcessPendingMessages();
138 ExecuteJavaScript("scroll.textContent = window.pageYOffset"); 138 ExecuteJavaScript("scroll.textContent = window.pageYOffset");
139 output = GetMainFrame()->contentAsText(kMaxOutputCharacters); 139 output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
140 EXPECT_EQ(kArrowUpNoScroll, base::UTF16ToASCII(output)); 140 EXPECT_EQ(kArrowUpNoScroll, base::UTF16ToASCII(output));
141 } 141 }
142 142
143 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698