| Index: content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
| index d987b2a4a4c699f5a7d163f8c55263753fe80b91..2a549850cccc38877d12233648b026f0aee01b7a 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
| @@ -27,6 +27,7 @@
|
| #include "net/base/filename_util.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| +#include "ui/base/layout.h"
|
| #include "ui/base/ui_base_switches.h"
|
| #include "ui/gfx/size_conversions.h"
|
| #include "ui/gfx/switches.h"
|
| @@ -54,16 +55,6 @@ namespace {
|
| return; \
|
| }
|
|
|
| -// Convenience macro: Short-circuit a pass for platforms where setting up
|
| -// high-DPI fails.
|
| -#define PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(factor) \
|
| - if (ui::GetScaleForScaleFactor( \
|
| - GetScaleFactorForView(GetRenderWidgetHostView())) != factor) { \
|
| - LOG(WARNING) << "Blindly passing this test: failed to set up " \
|
| - "scale factor: " << factor; \
|
| - return false; \
|
| - }
|
| -
|
| // Common base class for browser tests. This is subclassed twice: Once to test
|
| // the browser in forced-compositing mode, and once to test with compositing
|
| // mode disabled.
|
| @@ -810,7 +801,13 @@ class CompositingRenderWidgetHostViewTabCaptureHighDPI
|
|
|
| private:
|
| virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE {
|
| - PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale());
|
| + // Short-circuit a pass for platforms where setting up high-DPI fails.
|
| + if (ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(
|
| + GetScaleFactorForView(GetRenderWidgetHostView()))) != scale()) {
|
| + LOG(WARNING) << "Blindly passing this test: failed to set up "
|
| + "scale factor: " << scale();
|
| + return false;
|
| + }
|
| return true;
|
| }
|
|
|
|
|