Index: content/shell/renderer/layout_test/blink_test_runner.cc |
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc |
index 91d0cfabf41e7a21ad60a2a91e08073ea9e48030..ba3d3b705d740b39f2817b5ded933bd4ae3dd675 100644 |
--- a/content/shell/renderer/layout_test/blink_test_runner.cc |
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc |
@@ -10,6 +10,7 @@ |
#include <clocale> |
#include <cmath> |
#include <memory> |
+#include <string> |
#include <utility> |
#include "base/base64.h" |
@@ -1046,8 +1047,12 @@ void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() { |
void BlinkTestRunner::OnTryLeakDetection() { |
blink::WebFrame* main_frame = render_view()->GetWebView()->MainFrame(); |
- DCHECK_EQ(GURL(url::kAboutBlankURL), GURL(main_frame->GetDocument().Url())); |
+ |
DCHECK(!main_frame->IsLoading()); |
+ if (main_frame->IsWebLocalFrame()) { |
+ DCHECK_EQ(GURL(url::kAboutBlankURL), |
+ GURL(main_frame->ToWebLocalFrame()->GetDocument().Url())); |
+ } |
leak_detector_->TryLeakDetection(main_frame); |
} |