| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 ->GetValue() | 377 ->GetValue() |
| 378 ->GetAsInteger(&window_width)); | 378 ->GetAsInteger(&window_width)); |
| 379 EXPECT_TRUE(EvaluateScript(web_contents, "window.innerHeight") | 379 EXPECT_TRUE(EvaluateScript(web_contents, "window.innerHeight") |
| 380 ->GetResult() | 380 ->GetResult() |
| 381 ->GetValue() | 381 ->GetValue() |
| 382 ->GetAsInteger(&window_height)); | 382 ->GetAsInteger(&window_height)); |
| 383 | 383 |
| 384 #if !defined(OS_MACOSX) | 384 #if !defined(OS_MACOSX) |
| 385 // On Mac headless does not override the screen dimensions, so they are | 385 // On Mac headless does not override the screen dimensions, so they are |
| 386 // left with the actual screen values. | 386 // left with the actual screen values. |
| 387 EXPECT_EQ(kDefaultOptions.window_size.width(), screen_width); | 387 EXPECT_EQ(kDefaultOptions.screen_size.width(), screen_width); |
| 388 EXPECT_EQ(kDefaultOptions.window_size.height(), screen_height); | 388 EXPECT_EQ(kDefaultOptions.screen_size.height(), screen_height); |
| 389 #endif // !defined(OS_MACOSX) | 389 #endif // !defined(OS_MACOSX) |
| 390 EXPECT_EQ(kDefaultOptions.window_size.width(), window_width); | 390 EXPECT_EQ(kDefaultOptions.window_size.width(), window_width); |
| 391 EXPECT_EQ(kDefaultOptions.window_size.height(), window_height); | 391 EXPECT_EQ(kDefaultOptions.window_size.height(), window_height); |
| 392 } | 392 } |
| 393 | 393 |
| 394 namespace { | 394 namespace { |
| 395 | 395 |
| 396 class ProtocolHandlerWithCookies | 396 class ProtocolHandlerWithCookies |
| 397 : public net::URLRequestJobFactory::ProtocolHandler { | 397 : public net::URLRequestJobFactory::ProtocolHandler { |
| 398 public: | 398 public: |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 889 |
| 890 TraceHelper helper(this, target); | 890 TraceHelper helper(this, target); |
| 891 RunAsynchronousTest(); | 891 RunAsynchronousTest(); |
| 892 | 892 |
| 893 std::unique_ptr<base::ListValue> tracing_data = helper.TakeTracingData(); | 893 std::unique_ptr<base::ListValue> tracing_data = helper.TakeTracingData(); |
| 894 EXPECT_TRUE(tracing_data); | 894 EXPECT_TRUE(tracing_data); |
| 895 EXPECT_LT(0u, tracing_data->GetSize()); | 895 EXPECT_LT(0u, tracing_data->GetSize()); |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace headless | 898 } // namespace headless |
| OLD | NEW |