Chromium Code Reviews| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 #include "content/shell/common/shell_messages.h" | 52 #include "content/shell/common/shell_messages.h" |
| 53 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 53 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 54 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
| 55 | 55 |
| 56 namespace content { | 56 namespace content { |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 const int kTestSVGWindowWidthDip = 480; | 60 const int kTestSVGWindowWidthDip = 480; |
| 61 const int kTestSVGWindowHeightDip = 360; | 61 const int kTestSVGWindowHeightDip = 360; |
| 62 const int kTestPointerEventWindowWidthDip = 1000; | |
| 63 const int kTestPointerEventWindowHeightDip = 1200; | |
| 62 | 64 |
| 63 } // namespace | 65 } // namespace |
| 64 | 66 |
| 65 // BlinkTestResultPrinter ---------------------------------------------------- | 67 // BlinkTestResultPrinter ---------------------------------------------------- |
| 66 | 68 |
| 67 BlinkTestResultPrinter::BlinkTestResultPrinter(std::ostream* output, | 69 BlinkTestResultPrinter::BlinkTestResultPrinter(std::ostream* output, |
| 68 std::ostream* error) | 70 std::ostream* error) |
| 69 : state_(DURING_TEST), | 71 : state_(DURING_TEST), |
| 70 capture_text_only_(false), | 72 capture_text_only_(false), |
| 71 encode_binary_data_(false), | 73 encode_binary_data_(false), |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 main_window_render_process_hosts_.clear(); | 279 main_window_render_process_hosts_.clear(); |
| 278 accumulated_layout_test_runtime_flags_changes_.Clear(); | 280 accumulated_layout_test_runtime_flags_changes_.Clear(); |
| 279 ShellBrowserContext* browser_context = | 281 ShellBrowserContext* browser_context = |
| 280 ShellContentBrowserClient::Get()->browser_context(); | 282 ShellContentBrowserClient::Get()->browser_context(); |
| 281 if (test_url.spec().find("compositing/") != std::string::npos) | 283 if (test_url.spec().find("compositing/") != std::string::npos) |
| 282 is_compositing_test_ = true; | 284 is_compositing_test_ = true; |
| 283 initial_size_ = Shell::GetShellDefaultSize(); | 285 initial_size_ = Shell::GetShellDefaultSize(); |
| 284 // The W3C SVG layout tests use a different size than the other layout tests. | 286 // The W3C SVG layout tests use a different size than the other layout tests. |
| 285 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) | 287 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) |
| 286 initial_size_ = gfx::Size(kTestSVGWindowWidthDip, kTestSVGWindowHeightDip); | 288 initial_size_ = gfx::Size(kTestSVGWindowWidthDip, kTestSVGWindowHeightDip); |
| 289 // The W3C pointer event layout tests use a different size than the other | |
|
Rick Byers
2016/07/12 13:54:08
Ugh. I know you're just repeating the pattern abo
lanwei
2016/07/12 14:26:54
I agree. Navid, what do you think?
lanwei
2016/07/13 22:27:34
scrollIntoView can only align either to the top or
| |
| 290 // layout tests. | |
| 291 if (test_url.spec().find("pointerevents") != std::string::npos) | |
| 292 initial_size_ = gfx::Size(kTestPointerEventWindowWidthDip, | |
| 293 kTestPointerEventWindowHeightDip); | |
| 287 if (!main_window_) { | 294 if (!main_window_) { |
| 288 main_window_ = content::Shell::CreateNewWindow( | 295 main_window_ = content::Shell::CreateNewWindow( |
| 289 browser_context, | 296 browser_context, |
| 290 GURL(), | 297 GURL(), |
| 291 NULL, | 298 NULL, |
| 292 initial_size_); | 299 initial_size_); |
| 293 WebContentsObserver::Observe(main_window_->web_contents()); | 300 WebContentsObserver::Observe(main_window_->web_contents()); |
| 294 current_pid_ = base::kNullProcessId; | 301 current_pid_ = base::kNullProcessId; |
| 295 main_window_->LoadURL(test_url); | 302 main_window_->LoadURL(test_url); |
| 296 } else { | 303 } else { |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 928 } else { | 935 } else { |
| 929 printer_->AddErrorMessage(base::StringPrintf( | 936 printer_->AddErrorMessage(base::StringPrintf( |
| 930 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 937 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 931 event_name.c_str())); | 938 event_name.c_str())); |
| 932 return; | 939 return; |
| 933 } | 940 } |
| 934 bluetooth_chooser_factory_->SendEvent(event, argument); | 941 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 935 } | 942 } |
| 936 | 943 |
| 937 } // namespace content | 944 } // namespace content |
| OLD | NEW |