Chromium Code Reviews| Index: content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
| diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
| index d2d04bebfe84e4c04fa38465dad61c91a542fe16..f90ce10d3632a3c6f7ca5887aaf9dd1a421408c5 100644 |
| --- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
| +++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
| @@ -54,6 +54,11 @@ |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/skia_util.h" |
| +#if defined(OS_ANDROID) |
| +#include "content/browser/web_contents/web_contents_view.h" |
| +#include "ui/android/view_root.h" |
| +#endif |
| + |
| #define EXPECT_SIZE_EQ(expected, actual) \ |
| do { \ |
| EXPECT_EQ((expected).width(), (actual).width()); \ |
| @@ -604,6 +609,13 @@ IN_PROC_BROWSER_TEST_F(CaptureScreenshotTest, CaptureScreenshot) { |
| // See crbug.com/653637. |
| if (base::SysInfo::IsLowEndDevice()) return; |
| +#if defined(OS_ANDROID) |
| + std::unique_ptr<ui::ViewRoot> view_root(new ui::ViewRoot()); |
|
boliu
2017/01/03 19:16:11
it's not clear to me why this test is special, we
Jinsuk Kim
2017/01/04 10:45:02
It was a wrong change added for temporary glitch.
|
| + WebContentsImpl* web_contents = |
| + static_cast<WebContentsImpl*>(shell()->web_contents()); |
| + view_root->AddChild(web_contents->GetView()->GetNativeView()); |
| +#endif |
| + |
| shell()->LoadURL(GURL("about:blank")); |
| Attach(); |
| EXPECT_TRUE( |