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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698