OLD | NEW |
---|---|
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 const base::Callback<void(const SkBitmap&)>& callback) override; | 92 const base::Callback<void(const SkBitmap&)>& callback) override; |
93 void ReplicateLayoutTestRuntimeFlagsChanges( | 93 void ReplicateLayoutTestRuntimeFlagsChanges( |
94 const base::DictionaryValue& changed_values) override; | 94 const base::DictionaryValue& changed_values) override; |
95 bool HasCustomTextDump(std::string* custom_text_dump) const override; | 95 bool HasCustomTextDump(std::string* custom_text_dump) const override; |
96 bool ShouldDumpBackForwardList() const override; | 96 bool ShouldDumpBackForwardList() const override; |
97 blink::WebContentSettingsClient* GetWebContentSettings() const override; | 97 blink::WebContentSettingsClient* GetWebContentSettings() const override; |
98 void InitializeWebViewWithMocks(blink::WebView* web_view) override; | 98 void InitializeWebViewWithMocks(blink::WebView* web_view) override; |
99 void SetFocus(blink::WebView* web_view, bool focus) override; | 99 void SetFocus(blink::WebView* web_view, bool focus) override; |
100 | 100 |
101 // Methods used by WebViewTestClient and WebFrameTestClient. | 101 // Methods used by WebViewTestClient and WebFrameTestClient. |
102 void OnNavigationBegin() { is_navigating_ = true; } | |
103 void OnNavigationEnd() { is_navigating_ = false; } | |
102 void OnAnimationScheduled(blink::WebWidget* widget); | 104 void OnAnimationScheduled(blink::WebWidget* widget); |
103 void OnAnimationBegun(blink::WebWidget* widget); | 105 void OnAnimationBegun(blink::WebWidget* widget); |
104 std::string GetAcceptLanguages() const; | 106 std::string GetAcceptLanguages() const; |
105 bool shouldStayOnPageAfterHandlingBeforeUnload() const; | 107 bool shouldStayOnPageAfterHandlingBeforeUnload() const; |
106 MockScreenOrientationClient* getMockScreenOrientationClient(); | 108 MockScreenOrientationClient* getMockScreenOrientationClient(); |
107 MockWebUserMediaClient* getMockWebUserMediaClient(); | 109 MockWebUserMediaClient* getMockWebUserMediaClient(); |
108 MockWebSpeechRecognizer* getMockWebSpeechRecognizer(); | 110 MockWebSpeechRecognizer* getMockWebSpeechRecognizer(); |
109 bool isPrinting() const; | 111 bool isPrinting() const; |
110 bool shouldDumpAsCustomText() const; | 112 bool shouldDumpAsCustomText() const; |
111 std:: string customDumpText() const; | 113 std:: string customDumpText() const; |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
607 blink::WebView* main_view_; | 609 blink::WebView* main_view_; |
608 | 610 |
609 // This is non-0 IFF a load is in progress. | 611 // This is non-0 IFF a load is in progress. |
610 blink::WebFrame* top_loading_frame_; | 612 blink::WebFrame* top_loading_frame_; |
611 | 613 |
612 // WebContentSettingsClient mock object. | 614 // WebContentSettingsClient mock object. |
613 std::unique_ptr<MockContentSettingsClient> mock_content_settings_client_; | 615 std::unique_ptr<MockContentSettingsClient> mock_content_settings_client_; |
614 | 616 |
615 bool use_mock_theme_; | 617 bool use_mock_theme_; |
616 | 618 |
619 // This is true in the period between the start of a navigation and when the | |
620 // provisional load for that navigation is started. Note that when | |
621 // browser-side navigation is enabled there is an arbitrary gap between these | |
622 // two events. | |
623 bool is_navigating_; | |
clamy
2016/07/27 16:57:05
I find the name is_navigating_ a bit misleading, c
blundell
2016/07/29 15:02:46
Name changed. Re: commenting, is the second senten
| |
624 | |
617 std::unique_ptr<MockCredentialManagerClient> credential_manager_client_; | 625 std::unique_ptr<MockCredentialManagerClient> credential_manager_client_; |
618 std::unique_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; | 626 std::unique_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; |
619 std::unique_ptr<MockWebSpeechRecognizer> speech_recognizer_; | 627 std::unique_ptr<MockWebSpeechRecognizer> speech_recognizer_; |
620 std::unique_ptr<MockWebUserMediaClient> user_media_client_; | 628 std::unique_ptr<MockWebUserMediaClient> user_media_client_; |
621 std::unique_ptr<SpellCheckClient> spellcheck_; | 629 std::unique_ptr<SpellCheckClient> spellcheck_; |
622 | 630 |
623 // Number of currently active color choosers. | 631 // Number of currently active color choosers. |
624 int chooser_count_; | 632 int chooser_count_; |
625 | 633 |
626 // Captured drag image. | 634 // Captured drag image. |
(...skipping 10 matching lines...) Expand all Loading... | |
637 bool is_web_platform_tests_mode_; | 645 bool is_web_platform_tests_mode_; |
638 | 646 |
639 base::WeakPtrFactory<TestRunner> weak_factory_; | 647 base::WeakPtrFactory<TestRunner> weak_factory_; |
640 | 648 |
641 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 649 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
642 }; | 650 }; |
643 | 651 |
644 } // namespace test_runner | 652 } // namespace test_runner |
645 | 653 |
646 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 654 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |