OLD | NEW |
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 "base/location.h" | 5 #include "base/location.h" |
6 #include "base/single_thread_task_runner.h" | 6 #include "base/single_thread_task_runner.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 "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 FROM_HERE, | 346 FROM_HERE, |
347 base::Bind(&PopupCreatedObserver::Wait, base::Unretained(this)), | 347 base::Bind(&PopupCreatedObserver::Wait, base::Unretained(this)), |
348 base::TimeDelta::FromMilliseconds(200)); | 348 base::TimeDelta::FromMilliseconds(200)); |
349 } | 349 } |
350 | 350 |
351 size_t CountWidgets() { | 351 size_t CountWidgets() { |
352 scoped_ptr<content::RenderWidgetHostIterator> widgets( | 352 scoped_ptr<content::RenderWidgetHostIterator> widgets( |
353 content::RenderWidgetHost::GetRenderWidgetHosts()); | 353 content::RenderWidgetHost::GetRenderWidgetHosts()); |
354 size_t num_widgets = 0; | 354 size_t num_widgets = 0; |
355 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { | 355 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { |
356 if (widget->IsRenderView()) | 356 if (content::RenderViewHost::From(widget)) |
357 continue; | 357 continue; |
358 ++num_widgets; | 358 ++num_widgets; |
359 last_render_widget_host_ = widget; | 359 last_render_widget_host_ = widget; |
360 } | 360 } |
361 return num_widgets; | 361 return num_widgets; |
362 } | 362 } |
363 | 363 |
364 size_t initial_widget_count_; | 364 size_t initial_widget_count_; |
365 content::RenderWidgetHost* last_render_widget_host_; | 365 content::RenderWidgetHost* last_render_widget_host_; |
366 scoped_refptr<content::MessageLoopRunner> message_loop_; | 366 scoped_refptr<content::MessageLoopRunner> message_loop_; |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 // this time. | 1275 // this time. |
1276 for (size_t i = 0; i < 4; ++i) | 1276 for (size_t i = 0; i < 4; ++i) |
1277 SendKeyPressToPlatformApp(ui::VKEY_TAB); | 1277 SendKeyPressToPlatformApp(ui::VKEY_TAB); |
1278 ExtensionTestMessageListener webview_button_not_focused_listener( | 1278 ExtensionTestMessageListener webview_button_not_focused_listener( |
1279 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); | 1279 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); |
1280 webview_button_not_focused_listener.set_failure_message( | 1280 webview_button_not_focused_listener.set_failure_message( |
1281 "WebViewInteractiveTest.WebViewButtonWasFocused"); | 1281 "WebViewInteractiveTest.WebViewButtonWasFocused"); |
1282 SendMessageToEmbedder("verify"); | 1282 SendMessageToEmbedder("verify"); |
1283 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); | 1283 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); |
1284 } | 1284 } |
OLD | NEW |