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

Side by Side Diff: chrome/browser/apps/web_view_interactive_browsertest.cc

Issue 444813002: Remove BrowserPlugin's -internal-attach method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 6 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_window.h" 5 #include "apps/app_window.h"
6 #include "apps/app_window_registry.h" 6 #include "apps/app_window_registry.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/apps/app_browsertest_util.h" 10 #include "chrome/browser/apps/app_browsertest_util.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 message_loop_runner_ = new content::MessageLoopRunner; 48 message_loop_runner_ = new content::MessageLoopRunner;
49 message_loop_runner_->Run(); 49 message_loop_runner_->Run();
50 return web_contents_; 50 return web_contents_;
51 } 51 }
52 52
53 private: 53 private:
54 // GuestViewManager override: 54 // GuestViewManager override:
55 virtual void AddGuest(int guest_instance_id, 55 virtual void AddGuest(int guest_instance_id,
56 content::WebContents* guest_web_contents) OVERRIDE{ 56 content::WebContents* guest_web_contents) OVERRIDE{
57 extensions::GuestViewManager::AddGuest( 57 GuestViewManager::AddGuest(guest_instance_id, guest_web_contents);
58 guest_instance_id, guest_web_contents);
59 web_contents_ = guest_web_contents; 58 web_contents_ = guest_web_contents;
60 59
61 if (message_loop_runner_) 60 if (message_loop_runner_)
62 message_loop_runner_->Quit(); 61 message_loop_runner_->Quit();
63 } 62 }
64 63
65 content::WebContents* web_contents_; 64 content::WebContents* web_contents_;
66 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; 65 scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
67 }; 66 };
68 67
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 mouse_event.modifiers = 0; 326 mouse_event.modifiers = 0;
328 327
329 mouse_event.type = blink::WebInputEvent::MouseDown; 328 mouse_event.type = blink::WebInputEvent::MouseDown;
330 rwh->ForwardMouseEvent(mouse_event); 329 rwh->ForwardMouseEvent(mouse_event);
331 mouse_event.type = blink::WebInputEvent::MouseUp; 330 mouse_event.type = blink::WebInputEvent::MouseUp;
332 rwh->ForwardMouseEvent(mouse_event); 331 rwh->ForwardMouseEvent(mouse_event);
333 } 332 }
334 333
335 class PopupCreatedObserver { 334 class PopupCreatedObserver {
336 public: 335 public:
337 explicit PopupCreatedObserver() 336 PopupCreatedObserver()
338 : initial_widget_count_(0), 337 : initial_widget_count_(0),
339 last_render_widget_host_(NULL), 338 last_render_widget_host_(NULL),
340 seen_new_widget_(false) {} 339 seen_new_widget_(false) {}
341 340
342 ~PopupCreatedObserver() {} 341 ~PopupCreatedObserver() {}
343 342
344 void Wait() { 343 void Wait() {
345 size_t current_widget_count = CountWidgets(); 344 size_t current_widget_count = CountWidgets();
346 if (!seen_new_widget_ && 345 if (!seen_new_widget_ &&
347 current_widget_count == initial_widget_count_ + 1) { 346 current_widget_count == initial_widget_count_ + 1) {
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1079
1081 // Now verify that the selection text propagates properly to RWHV. 1080 // Now verify that the selection text propagates properly to RWHV.
1082 content::RenderWidgetHostView* guest_rwhv = 1081 content::RenderWidgetHostView* guest_rwhv =
1083 guest_web_contents()->GetRenderWidgetHostView(); 1082 guest_web_contents()->GetRenderWidgetHostView();
1084 ASSERT_TRUE(guest_rwhv); 1083 ASSERT_TRUE(guest_rwhv);
1085 std::string selected_text = base::UTF16ToUTF8(guest_rwhv->GetSelectedText()); 1084 std::string selected_text = base::UTF16ToUTF8(guest_rwhv->GetSelectedText());
1086 ASSERT_TRUE(selected_text.size() >= 10u); 1085 ASSERT_TRUE(selected_text.size() >= 10u);
1087 ASSERT_EQ("AAAAAAAAAA", selected_text.substr(0, 10)); 1086 ASSERT_EQ("AAAAAAAAAA", selected_text.substr(0, 10));
1088 } 1087 }
1089 #endif 1088 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698