Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: content/shell/test_runner/test_runner.cc

Issue 2962073002: OOPIF support for layout test pixel dumps.
Patch Set: Rebasing on top of 8bc8e844008b (still works locally). Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/test_runner/test_runner.cc
diff --git a/content/shell/test_runner/test_runner.cc b/content/shell/test_runner/test_runner.cc
index e270fd729e59910a6c50c2036fb05aac1e65a6e7..2cb3a25b5aeadaa9155df613cd50d34b88d66ba8 100644
--- a/content/shell/test_runner/test_runner.cc
+++ b/content/shell/test_runner/test_runner.cc
@@ -53,6 +53,7 @@
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebInputElement.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -1795,10 +1796,14 @@ void TestRunner::DumpPixelsAsync(
if (layout_test_runtime_flags_.is_printing()) {
test_runner::PrintFrameAsync(frame, std::move(callback));
} else {
- // TODO(lukasza): Ask the |delegate_| to capture the pixels in the browser
- // process, so that OOPIF pixels are also captured.
- test_runner::DumpPixelsAsync(frame, delegate_->GetDeviceScaleFactor(),
- std::move(callback));
+ if (frame->FrameWidget()->GetPagePopup()) {
+ // TODO(lukasza): DO NOT SUBMIT: Can that also be handled by the browser
+ // process?
+ test_runner::DumpPixelsAsync(frame, delegate_->GetDeviceScaleFactor(),
+ std::move(callback));
+ } else {
+ delegate_->DumpPixelsAsync(std::move(callback));
+ }
}
}
« no previous file with comments | « content/shell/renderer/layout_test/layout_test_render_frame_observer.cc ('k') | content/shell/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698