Index: content/shell/renderer/test_runner/WebTestProxy.cpp |
diff --git a/content/shell/renderer/test_runner/WebTestProxy.cpp b/content/shell/renderer/test_runner/WebTestProxy.cpp |
index 1a85a23b2410dd473717fe5ffa159fb858939355..1085be8b2bb691fac6f4485df0adb3a421c911eb 100644 |
--- a/content/shell/renderer/test_runner/WebTestProxy.cpp |
+++ b/content/shell/renderer/test_runner/WebTestProxy.cpp |
@@ -499,6 +499,18 @@ void WebTestProxyBase::CapturePixelsAsync( |
DCHECK(webWidget()->isAcceleratedCompositingActive()); |
DCHECK(!callback.is_null()); |
+ |
+ if (m_testInterfaces->testRunner()->isPrinting()) { |
+ // TODO(enne): get rid of stateful canvas(). |
+ webWidget()->layout(); |
+ paintPagesWithBoundaries(); |
+ DrawSelectionRect(canvas()); |
+ SkBaseDevice* device = skia::GetTopDevice(*canvas()); |
+ const SkBitmap& bitmap = device->accessBitmap(false); |
+ callback.Run(bitmap); |
danakj
2014/05/09 21:17:21
do you wanna post-task this to keep it async? othe
enne (OOO)
2014/05/09 21:25:06
It's a nice thought, but it seems awkward to do wi
danakj
2014/05/09 21:37:25
I figured the test harness shouldn't be doing anyt
enne (OOO)
2014/05/09 22:03:20
Done.
|
+ return; |
+ } |
+ |
m_compositeAndReadbackCallbacks.push_back(callback); |
webWidget()->compositeAndReadbackAsync(this); |
} |