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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged Created 4 years, 8 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
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/render_view_browsertest.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) 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 "content/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 11 matching lines...) Expand all
22 #include "base/values.h" 22 #include "base/values.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "content/browser/accessibility/accessibility_mode_helper.h" 24 #include "content/browser/accessibility/accessibility_mode_helper.h"
25 #include "content/browser/accessibility/browser_accessibility.h" 25 #include "content/browser/accessibility/browser_accessibility.h"
26 #include "content/browser/accessibility/browser_accessibility_manager.h" 26 #include "content/browser/accessibility/browser_accessibility_manager.h"
27 #include "content/browser/renderer_host/render_widget_host_impl.h" 27 #include "content/browser/renderer_host/render_widget_host_impl.h"
28 #include "content/browser/web_contents/web_contents_impl.h" 28 #include "content/browser/web_contents/web_contents_impl.h"
29 #include "content/browser/web_contents/web_contents_view.h" 29 #include "content/browser/web_contents/web_contents_view.h"
30 #include "content/common/input/synthetic_web_input_event_builders.h" 30 #include "content/common/input/synthetic_web_input_event_builders.h"
31 #include "content/common/input_messages.h" 31 #include "content/common/input_messages.h"
32 #include "content/common/text_input_state.h"
32 #include "content/common/view_messages.h" 33 #include "content/common/view_messages.h"
33 #include "content/public/browser/browser_context.h" 34 #include "content/public/browser/browser_context.h"
34 #include "content/public/browser/histogram_fetcher.h" 35 #include "content/public/browser/histogram_fetcher.h"
35 #include "content/public/browser/navigation_entry.h" 36 #include "content/public/browser/navigation_entry.h"
36 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
37 #include "content/public/browser/notification_types.h" 38 #include "content/public/browser/notification_types.h"
38 #include "content/public/browser/render_frame_host.h" 39 #include "content/public/browser/render_frame_host.h"
39 #include "content/public/browser/render_process_host.h" 40 #include "content/public/browser/render_process_host.h"
40 #include "content/public/browser/render_view_host.h" 41 #include "content/public/browser/render_view_host.h"
41 #include "content/public/browser/web_contents.h" 42 #include "content/public/browser/web_contents.h"
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 uint32_t InputMsgWatcher::WaitForAck() { 1217 uint32_t InputMsgWatcher::WaitForAck() {
1217 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1218 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1218 if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN) 1219 if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN)
1219 return ack_result_; 1220 return ack_result_;
1220 base::RunLoop run_loop; 1221 base::RunLoop run_loop;
1221 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); 1222 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure());
1222 run_loop.Run(); 1223 run_loop.Run();
1223 return ack_result_; 1224 return ack_result_;
1224 } 1225 }
1225 1226
1227 TextInputStateTestExport::TextInputStateTestExport(
1228 const ui::TextInputType& type,
1229 const std::string& value)
1230 : type_(type), value_(value) {}
1231
1232 // static
1233 TextInputStateTestExport TextInputStateTestExport::FromWebContents(
1234 WebContents* web_contents) {
1235 const TextInputState* state =
1236 static_cast<WebContentsImpl*>(web_contents)->GetTextInputState();
1237
1238 return TextInputStateTestExport(state->type, state->value);
1239 }
1240
1226 } // namespace content 1241 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698