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 "content/shell/browser/layout_test/blink_test_controller.h" | 5 #include "content/shell/browser/layout_test/blink_test_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <iostream> | 9 #include <iostream> |
10 #include <set> | 10 #include <set> |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "content/public/browser/render_view_host.h" | 34 #include "content/public/browser/render_view_host.h" |
35 #include "content/public/browser/render_widget_host.h" | 35 #include "content/public/browser/render_widget_host.h" |
36 #include "content/public/browser/render_widget_host_view.h" | 36 #include "content/public/browser/render_widget_host_view.h" |
37 #include "content/public/browser/service_worker_context.h" | 37 #include "content/public/browser/service_worker_context.h" |
38 #include "content/public/browser/storage_partition.h" | 38 #include "content/public/browser/storage_partition.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
41 #include "content/public/common/url_constants.h" | 41 #include "content/public/common/url_constants.h" |
42 #include "content/shell/browser/layout_test/layout_test_bluetooth_chooser_factor
y.h" | 42 #include "content/shell/browser/layout_test/layout_test_bluetooth_chooser_factor
y.h" |
43 #include "content/shell/browser/layout_test/layout_test_devtools_frontend.h" | 43 #include "content/shell/browser/layout_test/layout_test_devtools_frontend.h" |
| 44 #include "content/shell/browser/layout_test/notify_done_forwarder.h" |
44 #include "content/shell/browser/shell.h" | 45 #include "content/shell/browser/shell.h" |
45 #include "content/shell/browser/shell_browser_context.h" | 46 #include "content/shell/browser/shell_browser_context.h" |
46 #include "content/shell/browser/shell_content_browser_client.h" | 47 #include "content/shell/browser/shell_content_browser_client.h" |
47 #include "content/shell/browser/shell_devtools_frontend.h" | 48 #include "content/shell/browser/shell_devtools_frontend.h" |
48 #include "content/shell/common/shell_messages.h" | 49 #include "content/shell/common/shell_messages.h" |
49 #include "content/shell/common/shell_switches.h" | 50 #include "content/shell/common/shell_switches.h" |
50 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 51 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
51 #include "ui/gfx/codec/png_codec.h" | 52 #include "ui/gfx/codec/png_codec.h" |
52 | 53 |
53 namespace content { | 54 namespace content { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // The W3C SVG layout tests use a different size than the other layout tests. | 280 // The W3C SVG layout tests use a different size than the other layout tests. |
280 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) | 281 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) |
281 initial_size_ = gfx::Size(kTestSVGWindowWidthDip, kTestSVGWindowHeightDip); | 282 initial_size_ = gfx::Size(kTestSVGWindowWidthDip, kTestSVGWindowHeightDip); |
282 if (!main_window_) { | 283 if (!main_window_) { |
283 main_window_ = content::Shell::CreateNewWindow( | 284 main_window_ = content::Shell::CreateNewWindow( |
284 browser_context, | 285 browser_context, |
285 GURL(), | 286 GURL(), |
286 NULL, | 287 NULL, |
287 initial_size_); | 288 initial_size_); |
288 WebContentsObserver::Observe(main_window_->web_contents()); | 289 WebContentsObserver::Observe(main_window_->web_contents()); |
| 290 NotifyDoneForwarder::CreateForWebContents(main_window_->web_contents()); |
289 current_pid_ = base::kNullProcessId; | 291 current_pid_ = base::kNullProcessId; |
290 main_window_->LoadURL(test_url); | 292 main_window_->LoadURL(test_url); |
291 } else { | 293 } else { |
292 #if defined(OS_MACOSX) | 294 #if defined(OS_MACOSX) |
293 // Shell::SizeTo is not implemented on all platforms. | 295 // Shell::SizeTo is not implemented on all platforms. |
294 main_window_->SizeTo(initial_size_); | 296 main_window_->SizeTo(initial_size_); |
295 #endif | 297 #endif |
296 main_window_->web_contents() | 298 main_window_->web_contents() |
297 ->GetRenderViewHost() | 299 ->GetRenderViewHost() |
298 ->GetWidget() | 300 ->GetWidget() |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 } else { | 909 } else { |
908 printer_->AddErrorMessage(base::StringPrintf( | 910 printer_->AddErrorMessage(base::StringPrintf( |
909 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 911 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
910 event_name.c_str())); | 912 event_name.c_str())); |
911 return; | 913 return; |
912 } | 914 } |
913 bluetooth_chooser_factory_->SendEvent(event, argument); | 915 bluetooth_chooser_factory_->SendEvent(event, argument); |
914 } | 916 } |
915 | 917 |
916 } // namespace content | 918 } // namespace content |
OLD | NEW |