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

Side by Side Diff: chrome/test/base/render_view_test.cc

Issue 8190012: make browser_tests and interaction_ui_tests compile and link under use_aura=1 chromeos=0. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge clipboard change. Created 9 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 | « no previous file | chrome/test/base/ui_test_utils_linux.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/base/render_view_test.h" 5 #include "chrome/test/base/render_view_test.h"
6 6
7 #include "chrome/browser/extensions/extension_function_dispatcher.h" 7 #include "chrome/browser/extensions/extension_function_dispatcher.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/common/print_messages.h" 9 #include "chrome/common/print_messages.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 13 matching lines...) Expand all
24 #include "grit/renderer_resources.h" 24 #include "grit/renderer_resources.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
32 #include "webkit/glue/webkit_glue.h" 32 #include "webkit/glue/webkit_glue.h"
33 33
34 #if defined(OS_LINUX) 34 #if defined(OS_LINUX) && !defined(USE_AURA)
35 #include "ui/base/gtk/event_synthesis_gtk.h" 35 #include "ui/base/gtk/event_synthesis_gtk.h"
36 #endif 36 #endif
37 37
38 using WebKit::WebFrame; 38 using WebKit::WebFrame;
39 using WebKit::WebInputEvent; 39 using WebKit::WebInputEvent;
40 using WebKit::WebMouseEvent; 40 using WebKit::WebMouseEvent;
41 using WebKit::WebScriptController; 41 using WebKit::WebScriptController;
42 using WebKit::WebScriptSource; 42 using WebKit::WebScriptSource;
43 using WebKit::WebString; 43 using WebKit::WebString;
44 using WebKit::WebURLRequest; 44 using WebKit::WebURLRequest;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 NativeWebKeyboardEvent keydown_event(NULL, WM_KEYDOWN, key_code, 0); 204 NativeWebKeyboardEvent keydown_event(NULL, WM_KEYDOWN, key_code, 0);
205 SendNativeKeyEvent(keydown_event); 205 SendNativeKeyEvent(keydown_event);
206 206
207 NativeWebKeyboardEvent char_event(NULL, WM_CHAR, (*output)[0], 0); 207 NativeWebKeyboardEvent char_event(NULL, WM_CHAR, (*output)[0], 0);
208 SendNativeKeyEvent(char_event); 208 SendNativeKeyEvent(char_event);
209 209
210 NativeWebKeyboardEvent keyup_event(NULL, WM_KEYUP, key_code, 0); 210 NativeWebKeyboardEvent keyup_event(NULL, WM_KEYUP, key_code, 0);
211 SendNativeKeyEvent(keyup_event); 211 SendNativeKeyEvent(keyup_event);
212 212
213 return length; 213 return length;
214 #elif defined(OS_LINUX) 214 #elif defined(OS_LINUX) && !defined(USE_AURA)
215 // We ignore |layout|, which means we are only testing the layout of the 215 // We ignore |layout|, which means we are only testing the layout of the
216 // current locale. TODO(estade): fix this to respect |layout|. 216 // current locale. TODO(estade): fix this to respect |layout|.
217 std::vector<GdkEvent*> events; 217 std::vector<GdkEvent*> events;
218 ui::SynthesizeKeyPressEvents( 218 ui::SynthesizeKeyPressEvents(
219 NULL, static_cast<ui::KeyboardCode>(key_code), 219 NULL, static_cast<ui::KeyboardCode>(key_code),
220 modifiers & (MockKeyboard::LEFT_CONTROL | MockKeyboard::RIGHT_CONTROL), 220 modifiers & (MockKeyboard::LEFT_CONTROL | MockKeyboard::RIGHT_CONTROL),
221 modifiers & (MockKeyboard::LEFT_SHIFT | MockKeyboard::RIGHT_SHIFT), 221 modifiers & (MockKeyboard::LEFT_SHIFT | MockKeyboard::RIGHT_SHIFT),
222 modifiers & (MockKeyboard::LEFT_ALT | MockKeyboard::RIGHT_ALT), 222 modifiers & (MockKeyboard::LEFT_ALT | MockKeyboard::RIGHT_ALT),
223 &events); 223 &events);
224 224
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 view_->OnMessageReceived(*input_message); 320 view_->OnMessageReceived(*input_message);
321 return true; 321 return true;
322 } 322 }
323 323
324 void RenderViewTest::ClearHistory() { 324 void RenderViewTest::ClearHistory() {
325 view_->page_id_ = -1; 325 view_->page_id_ = -1;
326 view_->history_list_offset_ = -1; 326 view_->history_list_offset_ = -1;
327 view_->history_list_length_ = 0; 327 view_->history_list_length_ = 0;
328 view_->history_page_ids_.clear(); 328 view_->history_page_ids_.clear();
329 } 329 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/base/ui_test_utils_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698