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

Unified Diff: components/test_runner/test_runner.h

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
« no previous file with comments | « no previous file | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.h
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index bfb06cfafd7e53694dc63463deeb37ec2e79591e..57c0f0ce1b567d437eb9dc3a6d90342286102e7d 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -135,7 +135,19 @@ class TestRunner : public WebTestRunner {
bool shouldDumpSpellCheckCallbacks() const;
bool shouldWaitUntilExternalURLLoad() const;
const std::set<std::string>* httpHeadersToClear() const;
- void setTopLoadingFrame(blink::WebFrame*, bool);
+
+ // To be called when |frame| starts loading - TestRunner will check if
+ // there is currently no top-loading-frame being tracked and if so, then it
+ // will return true and start tracking |frame| as the top-loading-frame.
+ bool tryToSetTopLoadingFrame(blink::WebFrame* frame);
+
+ // To be called when |frame| finishes loading - TestRunner will check if
+ // |frame| is currently tracked as the top-loading-frame, and if yes, then it
+ // will return true, stop top-loading-frame tracking, and potentially finish
+ // the test (unless testRunner.waitUntilDone() was called and/or there are
+ // pending load requests in WorkQueue).
+ bool tryToClearTopLoadingFrame(blink::WebFrame*);
+
blink::WebFrame* topLoadingFrame() const;
void policyDelegateDone();
bool policyDelegateEnabled() const;
@@ -530,6 +542,8 @@ class TestRunner : public WebTestRunner {
///////////////////////////////////////////////////////////////////////////
// Internal helpers
+ bool IsFramePartOfMainTestWindow(blink::WebFrame*) const;
Łukasz Anforowicz 2016/04/27 17:06:53 This belongs in "private" part of TestRunner class
+
void CheckResponseMimeType();
void CompleteNotifyDone();
« no previous file with comments | « no previous file | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698