| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ | |
| 6 #define COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h" | |
| 13 #include "third_party/WebKit/public/platform/WebURLRequest.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 class WebURL; | |
| 17 } // namespace blink | |
| 18 | |
| 19 namespace test_runner { | |
| 20 | |
| 21 class MockWebDocumentSubresourceFilter | |
| 22 : public blink::WebDocumentSubresourceFilter { | |
| 23 public: | |
| 24 explicit MockWebDocumentSubresourceFilter( | |
| 25 const std::vector<std::string>& disallowed_path_suffixes); | |
| 26 ~MockWebDocumentSubresourceFilter() override; | |
| 27 | |
| 28 // blink::WebDocumentSubresourceFilter: | |
| 29 LoadPolicy getLoadPolicy(const blink::WebURL& resource_url, | |
| 30 blink::WebURLRequest::RequestContext) override; | |
| 31 void reportDisallowedLoad() override; | |
| 32 | |
| 33 private: | |
| 34 std::vector<std::string> disallowed_path_suffixes_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(MockWebDocumentSubresourceFilter); | |
| 37 }; | |
| 38 | |
| 39 } // namespace test_runner | |
| 40 | |
| 41 #endif // COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ | |
| OLD | NEW |