OLD | NEW |
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/strings/string16.h" |
6 #include "base/string16.h" | 6 #include "base/strings/string_util.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 #include "webkit/common/webpreferences.h" | 11 #include "webkit/common/webpreferences.h" |
12 | 12 |
13 #include <Cocoa/Cocoa.h> | 13 #include <Cocoa/Cocoa.h> |
14 #include <Carbon/Carbon.h> // for the kVK_* constants. | 14 #include <Carbon/Carbon.h> // for the kVK_* constants. |
15 | 15 |
16 namespace content { | 16 namespace content { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 "38,false,false,true,false\np1\n\np2"; | 141 "38,false,false,true,false\np1\n\np2"; |
142 view->OnSetEditCommandsForNextKeyEvent( | 142 view->OnSetEditCommandsForNextKeyEvent( |
143 EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); | 143 EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); |
144 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); | 144 SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); |
145 ProcessPendingMessages(); | 145 ProcessPendingMessages(); |
146 output = GetMainFrame()->contentAsText(kMaxOutputCharacters); | 146 output = GetMainFrame()->contentAsText(kMaxOutputCharacters); |
147 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output)); | 147 EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output)); |
148 } | 148 } |
149 | 149 |
150 } // namespace content | 150 } // namespace content |
OLD | NEW |