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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. 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
« no previous file with comments | « content/renderer/savable_resources.cc ('k') | content/shell/test_runner/accessibility_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 09c91b67a66ea057195c38a7fef7b219d18e50c6..18ed15316b27fef73c33b755048cfa60d30386c2 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"
@@ -1050,8 +1051,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);
}
« no previous file with comments | « content/renderer/savable_resources.cc ('k') | content/shell/test_runner/accessibility_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698