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

Unified Diff: components/html_viewer/web_test_delegate_impl.cc

Issue 1297173002: html_viewer: Make sure window.internals is set-up correctly in layout-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/web_test_delegate_impl.cc
diff --git a/components/html_viewer/web_test_delegate_impl.cc b/components/html_viewer/web_test_delegate_impl.cc
index 12474ec54769aed5157be30984296c6276a5bbd0..5385a660b454a48cbf051db0a7c590c8bca9647a 100644
--- a/components/html_viewer/web_test_delegate_impl.cc
+++ b/components/html_viewer/web_test_delegate_impl.cc
@@ -228,7 +228,8 @@ void WebTestDelegateImpl::SetLocale(const std::string& locale) {
void WebTestDelegateImpl::TestFinished() {
test_interfaces_->SetTestIsRunning(false);
- fprintf(stderr, "%s", proxy_->CaptureTree(false, false).c_str());
+ fprintf(stderr, "%s", proxy_ ? proxy_->CaptureTree(false, false).c_str()
+ : dump_tree_.c_str());
}
void WebTestDelegateImpl::CloseRemainingWindows() {
@@ -324,4 +325,11 @@ blink::WebPlugin* WebTestDelegateImpl::CreatePluginPlaceholder(
return nullptr;
}
+void WebTestDelegateImpl::OnWebTestProxyBaseDestroy(
+ test_runner::WebTestProxyBase* base) {
+ DCHECK_EQ(proxy_, base);
+ dump_tree_ = proxy_->CaptureTree(false, false);
+ proxy_ = nullptr;
+}
+
} // namespace html_viewer
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698