| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEB_FRAME_TEST_CLIENT_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // WebFrameTestClient implements WebFrameClient interface, providing behavior | 21 // WebFrameTestClient implements WebFrameClient interface, providing behavior |
| 22 // expected by tests. WebFrameTestClient ends up used by WebFrameTestProxy | 22 // expected by tests. WebFrameTestClient ends up used by WebFrameTestProxy |
| 23 // which coordinates forwarding WebFrameClient calls either to | 23 // which coordinates forwarding WebFrameClient calls either to |
| 24 // WebFrameTestClient or to the product code (i.e. to RenderFrameImpl). | 24 // WebFrameTestClient or to the product code (i.e. to RenderFrameImpl). |
| 25 class WebFrameTestClient : public blink::WebFrameClient { | 25 class WebFrameTestClient : public blink::WebFrameClient { |
| 26 public: | 26 public: |
| 27 // Caller has to ensure that all arguments (|test_runner|, |delegate| and so | 27 // Caller has to ensure that all arguments (|test_runner|, |delegate| and so |
| 28 // forth) live longer than |this|. | 28 // forth) live longer than |this|. |
| 29 WebFrameTestClient(TestRunner* test_runner, | 29 WebFrameTestClient(TestRunner* test_runner, |
| 30 WebTestDelegate* delegate, | 30 WebTestDelegate* delegate, |
| 31 AccessibilityController* accessibility_controller, | |
| 32 WebTestProxyBase* web_test_proxy_base); | 31 WebTestProxyBase* web_test_proxy_base); |
| 33 | 32 |
| 34 ~WebFrameTestClient() override; | 33 ~WebFrameTestClient() override; |
| 35 | 34 |
| 36 // WebFrameClient overrides needed by WebFrameTestProxy. | 35 // WebFrameClient overrides needed by WebFrameTestProxy. |
| 37 blink::WebColorChooser* createColorChooser( | 36 blink::WebColorChooser* createColorChooser( |
| 38 blink::WebColorChooserClient* client, | 37 blink::WebColorChooserClient* client, |
| 39 const blink::WebColor& initial_color, | 38 const blink::WebColor& initial_color, |
| 40 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; | 39 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; |
| 41 void runModalAlertDialog(const blink::WebString& message) override; | 40 void runModalAlertDialog(const blink::WebString& message) override; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void checkIfAudioSinkExistsAndIsAuthorized( | 106 void checkIfAudioSinkExistsAndIsAuthorized( |
| 108 const blink::WebString& sink_id, | 107 const blink::WebString& sink_id, |
| 109 const blink::WebSecurityOrigin& security_origin, | 108 const blink::WebSecurityOrigin& security_origin, |
| 110 blink::WebSetSinkIdCallbacks* web_callbacks) override; | 109 blink::WebSetSinkIdCallbacks* web_callbacks) override; |
| 111 void didClearWindowObject(blink::WebLocalFrame* frame) override; | 110 void didClearWindowObject(blink::WebLocalFrame* frame) override; |
| 112 | 111 |
| 113 private: | 112 private: |
| 114 // Borrowed pointers to other parts of Layout Tests state. | 113 // Borrowed pointers to other parts of Layout Tests state. |
| 115 TestRunner* test_runner_; | 114 TestRunner* test_runner_; |
| 116 WebTestDelegate* delegate_; | 115 WebTestDelegate* delegate_; |
| 117 AccessibilityController* accessibility_controller_; | |
| 118 WebTestProxyBase* web_test_proxy_base_; | 116 WebTestProxyBase* web_test_proxy_base_; |
| 119 | 117 |
| 120 // Map from request identifier into resource url description. The map is used | 118 // Map from request identifier into resource url description. The map is used |
| 121 // to track resource requests spanning willSendRequest, didReceiveResponse, | 119 // to track resource requests spanning willSendRequest, didReceiveResponse, |
| 122 // didChangeResourcePriority, didFinishResourceLoad. | 120 // didChangeResourcePriority, didFinishResourceLoad. |
| 123 std::map<unsigned, std::string> resource_identifier_map_; | 121 std::map<unsigned, std::string> resource_identifier_map_; |
| 124 | 122 |
| 125 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); | 123 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); |
| 126 }; | 124 }; |
| 127 | 125 |
| 128 } // namespace test_runner | 126 } // namespace test_runner |
| 129 | 127 |
| 130 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ | 128 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
| OLD | NEW |