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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2963593002: Split DumpPixelsAsync in pixel_dump.h into more granular functions. (Closed)
Patch Set: Addressed CR feedback from alexmos@. 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/shell/test_runner/pixel_dump.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 CaptureDumpContinued(); 916 CaptureDumpContinued();
917 } 917 }
918 918
919 void BlinkTestRunner::CaptureDumpContinued() { 919 void BlinkTestRunner::CaptureDumpContinued() {
920 test_runner::WebTestInterfaces* interfaces = 920 test_runner::WebTestInterfaces* interfaces =
921 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 921 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
922 if (test_config_->enable_pixel_dumping && 922 if (test_config_->enable_pixel_dumping &&
923 interfaces->TestRunner()->ShouldGeneratePixelResults() && 923 interfaces->TestRunner()->ShouldGeneratePixelResults() &&
924 !interfaces->TestRunner()->ShouldDumpAsAudio()) { 924 !interfaces->TestRunner()->ShouldDumpAsAudio()) {
925 CHECK(render_view()->GetWebView()->IsAcceleratedCompositingActive()); 925 CHECK(render_view()->GetWebView()->IsAcceleratedCompositingActive());
926
927 // Test finish should only be processed in the BlinkTestRunner associated
928 // with the current, non-swapped-out RenderView.
929 DCHECK(render_view()->GetWebView()->MainFrame()->IsWebLocalFrame());
930
926 interfaces->TestRunner()->DumpPixelsAsync( 931 interfaces->TestRunner()->DumpPixelsAsync(
927 render_view()->GetWebView(), 932 render_view()->GetWebView()->MainFrame()->ToWebLocalFrame(),
928 base::Bind(&BlinkTestRunner::OnPixelsDumpCompleted, 933 base::Bind(&BlinkTestRunner::OnPixelsDumpCompleted,
929 base::Unretained(this))); 934 base::Unretained(this)));
930 return; 935 return;
931 } 936 }
932 937
933 CaptureDumpComplete(); 938 CaptureDumpComplete();
934 } 939 }
935 940
936 void BlinkTestRunner::OnPixelsDumpCompleted(const SkBitmap& snapshot) { 941 void BlinkTestRunner::OnPixelsDumpCompleted(const SkBitmap& snapshot) {
937 DCHECK_NE(0, snapshot.info().width()); 942 DCHECK_NE(0, snapshot.info().width());
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 void BlinkTestRunner::ReportLeakDetectionResult( 1078 void BlinkTestRunner::ReportLeakDetectionResult(
1074 const LeakDetectionResult& report) { 1079 const LeakDetectionResult& report) {
1075 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1080 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1076 } 1081 }
1077 1082
1078 void BlinkTestRunner::OnDestruct() { 1083 void BlinkTestRunner::OnDestruct() {
1079 delete this; 1084 delete this;
1080 } 1085 }
1081 1086
1082 } // namespace content 1087 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/test_runner/pixel_dump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698