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

Side by Side Diff: content/shell/renderer/test_runner/test_runner.h

Issue 200663002: Add 'waitUntilExternalURLLoad' method to TestRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra whitespace Created 6 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 | Annotate | Revision Log
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 CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool shouldDumpIconChanges() const; 98 bool shouldDumpIconChanges() const;
99 bool shouldDumpCreateView() const; 99 bool shouldDumpCreateView() const;
100 bool canOpenWindows() const; 100 bool canOpenWindows() const;
101 bool shouldDumpResourceLoadCallbacks() const; 101 bool shouldDumpResourceLoadCallbacks() const;
102 bool shouldDumpResourceRequestCallbacks() const; 102 bool shouldDumpResourceRequestCallbacks() const;
103 bool shouldDumpResourceResponseMIMETypes() const; 103 bool shouldDumpResourceResponseMIMETypes() const;
104 bool shouldDumpStatusCallbacks() const; 104 bool shouldDumpStatusCallbacks() const;
105 bool shouldDumpProgressFinishedCallback() const; 105 bool shouldDumpProgressFinishedCallback() const;
106 bool shouldDumpSpellCheckCallbacks() const; 106 bool shouldDumpSpellCheckCallbacks() const;
107 bool shouldStayOnPageAfterHandlingBeforeUnload() const; 107 bool shouldStayOnPageAfterHandlingBeforeUnload() const;
108 bool shouldWaitUntilExternalURLLoad() const;
108 const std::set<std::string>* httpHeadersToClear() const; 109 const std::set<std::string>* httpHeadersToClear() const;
109 void setTopLoadingFrame(blink::WebFrame*, bool); 110 void setTopLoadingFrame(blink::WebFrame*, bool);
110 blink::WebFrame* topLoadingFrame() const; 111 blink::WebFrame* topLoadingFrame() const;
111 void policyDelegateDone(); 112 void policyDelegateDone();
112 bool policyDelegateEnabled() const; 113 bool policyDelegateEnabled() const;
113 bool policyDelegateIsPermissive() const; 114 bool policyDelegateIsPermissive() const;
114 bool policyDelegateShouldNotifyDone() const; 115 bool policyDelegateShouldNotifyDone() const;
115 bool shouldInterceptPostMessage() const; 116 bool shouldInterceptPostMessage() const;
116 bool shouldDumpResourcePriorities() const; 117 bool shouldDumpResourcePriorities() const;
117 blink::WebNotificationPresenter* notification_presenter() const; 118 blink::WebNotificationPresenter* notification_presenter() const;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 void SetWillSendRequestClearHeader(const std::string& header); 437 void SetWillSendRequestClearHeader(const std::string& header);
437 438
438 // This function sets a flag that tells the test_shell to dump a descriptive 439 // This function sets a flag that tells the test_shell to dump a descriptive
439 // line for each resource load's priority and any time that priority 440 // line for each resource load's priority and any time that priority
440 // changes. It takes no arguments, and ignores any that may be present. 441 // changes. It takes no arguments, and ignores any that may be present.
441 void DumpResourceRequestPriorities(); 442 void DumpResourceRequestPriorities();
442 443
443 // Sets a flag to enable the mock theme. 444 // Sets a flag to enable the mock theme.
444 void SetUseMockTheme(bool use); 445 void SetUseMockTheme(bool use);
445 446
447 // Sets a flag that causes the test to be marked as completed when the
448 // WebFrameClient receives a loadURLExternally() call.
449 void WaitUntilExternalURLLoad();
450
446 /////////////////////////////////////////////////////////////////////////// 451 ///////////////////////////////////////////////////////////////////////////
447 // Methods interacting with the WebTestProxy 452 // Methods interacting with the WebTestProxy
448 453
449 /////////////////////////////////////////////////////////////////////////// 454 ///////////////////////////////////////////////////////////////////////////
450 // Methods forwarding to the WebTestDelegate 455 // Methods forwarding to the WebTestDelegate
451 456
452 // Shows DevTools window. 457 // Shows DevTools window.
453 void ShowWebInspector(const std::string& str, 458 void ShowWebInspector(const std::string& str,
454 const std::string& frontend_url); 459 const std::string& frontend_url);
455 void CloseWebInspector(); 460 void CloseWebInspector();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 bool test_is_running_; 532 bool test_is_running_;
528 533
529 // When reset is called, go through and close all but the main test shell 534 // When reset is called, go through and close all but the main test shell
530 // window. By default, set to true but toggled to false using 535 // window. By default, set to true but toggled to false using
531 // setCloseRemainingWindowsWhenComplete(). 536 // setCloseRemainingWindowsWhenComplete().
532 bool close_remaining_windows_; 537 bool close_remaining_windows_;
533 538
534 // If true, don't dump output until notifyDone is called. 539 // If true, don't dump output until notifyDone is called.
535 bool wait_until_done_; 540 bool wait_until_done_;
536 541
542 // If true, ends the test when a URL is loaded externally via
543 // WebFrameClient::loadURLExternally().
544 bool wait_until_external_url_load_;
545
537 // Causes navigation actions just printout the intended navigation instead 546 // Causes navigation actions just printout the intended navigation instead
538 // of taking you to the page. This is used for cases like mailto, where you 547 // of taking you to the page. This is used for cases like mailto, where you
539 // don't actually want to open the mail program. 548 // don't actually want to open the mail program.
540 bool policy_delegate_enabled_; 549 bool policy_delegate_enabled_;
541 550
542 // Toggles the behavior of the policy delegate. If true, then navigations 551 // Toggles the behavior of the policy delegate. If true, then navigations
543 // will be allowed. Otherwise, they will be ignored (dropped). 552 // will be allowed. Otherwise, they will be ignored (dropped).
544 bool policy_delegate_is_permissive_; 553 bool policy_delegate_is_permissive_;
545 554
546 // If true, the policy delegate will signal layout test completion. 555 // If true, the policy delegate will signal layout test completion.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 bool use_mock_theme_; 711 bool use_mock_theme_;
703 712
704 base::WeakPtrFactory<TestRunner> weak_factory_; 713 base::WeakPtrFactory<TestRunner> weak_factory_;
705 714
706 DISALLOW_COPY_AND_ASSIGN(TestRunner); 715 DISALLOW_COPY_AND_ASSIGN(TestRunner);
707 }; 716 };
708 717
709 } // namespace content 718 } // namespace content
710 719
711 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ 720 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/WebTestProxy.cpp ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698