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

Unified Diff: components/test_runner/web_frame_test_client.cc

Issue 1893783002: Split TestRunner::setTopLoadingFrame into separate "set" and "clear" methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicate-across-all-renderers
Patch Set: Make tryTo... methods return bool + small comments and self-review tweaks. Created 4 years, 8 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: components/test_runner/web_frame_test_client.cc
diff --git a/components/test_runner/web_frame_test_client.cc b/components/test_runner/web_frame_test_client.cc
index 0af3babda9dcc53cd8ee3451384e4e8ed8b3049b..d8e628718d38c022310f1f39df2ecf2d1fbffbc5 100644
--- a/components/test_runner/web_frame_test_client.cc
+++ b/components/test_runner/web_frame_test_client.cc
@@ -188,12 +188,10 @@ enum CheckDoneReason {
void CheckDone(blink::WebLocalFrame* frame,
CheckDoneReason reason,
TestRunner* test_runner) {
- if (frame != test_runner->topLoadingFrame())
- return;
if (reason != MainResourceLoadFailed &&
(frame->isResourceLoadInProgress() || frame->isLoading()))
return;
- test_runner->setTopLoadingFrame(frame, true);
+ test_runner->tryToClearTopLoadingFrame(frame);
}
} // namespace
@@ -430,8 +428,7 @@ void WebFrameTestClient::loadURLExternally(
void WebFrameTestClient::didStartProvisionalLoad(blink::WebLocalFrame* frame,
double trigering_event_time) {
- if (!test_runner_->topLoadingFrame())
- test_runner_->setTopLoadingFrame(frame, false);
+ test_runner_->tryToSetTopLoadingFrame(frame);
if (test_runner_->shouldDumpFrameLoadCallbacks()) {
PrintFrameDescription(delegate_, frame);
« components/test_runner/test_runner.h ('K') | « components/test_runner/test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698