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

Side by Side 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, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool shouldDumpTitleChanges() const; 128 bool shouldDumpTitleChanges() const;
129 bool shouldDumpIconChanges() const; 129 bool shouldDumpIconChanges() const;
130 bool shouldDumpCreateView() const; 130 bool shouldDumpCreateView() const;
131 bool canOpenWindows() const; 131 bool canOpenWindows() const;
132 bool shouldDumpResourceLoadCallbacks() const; 132 bool shouldDumpResourceLoadCallbacks() const;
133 bool shouldDumpResourceResponseMIMETypes() const; 133 bool shouldDumpResourceResponseMIMETypes() const;
134 bool shouldDumpStatusCallbacks() const; 134 bool shouldDumpStatusCallbacks() const;
135 bool shouldDumpSpellCheckCallbacks() const; 135 bool shouldDumpSpellCheckCallbacks() const;
136 bool shouldWaitUntilExternalURLLoad() const; 136 bool shouldWaitUntilExternalURLLoad() const;
137 const std::set<std::string>* httpHeadersToClear() const; 137 const std::set<std::string>* httpHeadersToClear() const;
138 void setTopLoadingFrame(blink::WebFrame*, bool); 138
139 // To be called when |frame| starts loading - TestRunner will check if
140 // there is currently no top-loading-frame being tracked and if so, then it
141 // will return true and start tracking |frame| as the top-loading-frame.
142 bool tryToSetTopLoadingFrame(blink::WebFrame* frame);
143
144 // To be called when |frame| finishes loading - TestRunner will check if
145 // |frame| is currently tracked as the top-loading-frame, and if yes, then it
146 // will return true, stop top-loading-frame tracking, and potentially finish
147 // the test (unless testRunner.waitUntilDone() was called and/or there are
148 // pending load requests in WorkQueue).
149 bool tryToClearTopLoadingFrame(blink::WebFrame*);
150
139 blink::WebFrame* topLoadingFrame() const; 151 blink::WebFrame* topLoadingFrame() const;
140 void policyDelegateDone(); 152 void policyDelegateDone();
141 bool policyDelegateEnabled() const; 153 bool policyDelegateEnabled() const;
142 bool policyDelegateIsPermissive() const; 154 bool policyDelegateIsPermissive() const;
143 bool policyDelegateShouldNotifyDone() const; 155 bool policyDelegateShouldNotifyDone() const;
144 bool shouldInterceptPostMessage() const; 156 bool shouldInterceptPostMessage() const;
145 bool shouldDumpResourcePriorities() const; 157 bool shouldDumpResourcePriorities() const;
146 void setToolTipText(const blink::WebString&); 158 void setToolTipText(const blink::WebString&);
147 void setDragImage(const blink::WebImage& drag_image); 159 void setDragImage(const blink::WebImage& drag_image);
148 bool shouldDumpNavigationPolicy() const; 160 bool shouldDumpNavigationPolicy() const;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 const std::string& password); 535 const std::string& password);
524 void AddMockCredentialManagerError(const std::string& error); 536 void AddMockCredentialManagerError(const std::string& error);
525 537
526 // Takes care of notifying the delegate after a change to layout test runtime 538 // Takes care of notifying the delegate after a change to layout test runtime
527 // flags. 539 // flags.
528 void OnLayoutTestRuntimeFlagsChanged(); 540 void OnLayoutTestRuntimeFlagsChanged();
529 541
530 /////////////////////////////////////////////////////////////////////////// 542 ///////////////////////////////////////////////////////////////////////////
531 // Internal helpers 543 // Internal helpers
532 544
545 bool IsFramePartOfMainTestWindow(blink::WebFrame*) const;
Łukasz Anforowicz 2016/04/27 17:06:53 This belongs in "private" part of TestRunner class
546
533 void CheckResponseMimeType(); 547 void CheckResponseMimeType();
534 void CompleteNotifyDone(); 548 void CompleteNotifyDone();
535 549
536 // In the Mac code, this is called to trigger the end of a test after the 550 // In the Mac code, this is called to trigger the end of a test after the
537 // page has finished loading. From here, we can generate the dump for the 551 // page has finished loading. From here, we can generate the dump for the
538 // test. 552 // test.
539 void LocationChangeDone(); 553 void LocationChangeDone();
540 554
541 bool test_is_running_; 555 bool test_is_running_;
542 556
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 WebTestProxyBase* web_test_proxy_base_; 842 WebTestProxyBase* web_test_proxy_base_;
829 843
830 base::WeakPtrFactory<TestRunnerForSpecificView> weak_factory_; 844 base::WeakPtrFactory<TestRunnerForSpecificView> weak_factory_;
831 845
832 DISALLOW_COPY_AND_ASSIGN(TestRunnerForSpecificView); 846 DISALLOW_COPY_AND_ASSIGN(TestRunnerForSpecificView);
833 }; 847 };
834 848
835 } // namespace test_runner 849 } // namespace test_runner
836 850
837 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 851 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW
« 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