Chromium Code Reviews| Index: components/test_runner/mock_web_document_subresource_filter.h |
| diff --git a/components/test_runner/mock_web_document_subresource_filter.h b/components/test_runner/mock_web_document_subresource_filter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f60ada5ca572c4f40ab8063508ad14d91fa5d233 |
| --- /dev/null |
| +++ b/components/test_runner/mock_web_document_subresource_filter.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ |
| +#define COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h" |
| +#include "third_party/WebKit/public/platform/WebURLRequest.h" |
| + |
| +namespace blink { |
| +class WebURL; |
| +} // namespace blink |
| + |
| +namespace test_runner { |
| + |
| +class MockWebDocumentSubresourceFilter |
|
battre
2016/05/30 15:29:25
add a comment?
engedy
2016/05/30 20:54:00
This is Blink territory, so there are no comments
|
| + : public blink::WebDocumentSubresourceFilter { |
| + public: |
| + MockWebDocumentSubresourceFilter( |
|
battre
2016/05/30 15:29:25
explicit?
engedy
2016/05/30 20:54:00
Done.
|
| + const std::vector<std::string>& disallowed_path_suffixes); |
| + ~MockWebDocumentSubresourceFilter() override; |
| + |
| + // blink::WebDocumentSubresourceFilter: |
| + bool allowLoad(const blink::WebURL& resource_url, |
| + blink::WebURLRequest::RequestContext) override; |
| + |
| + private: |
| + std::vector<std::string> disallowed_path_suffixes_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MockWebDocumentSubresourceFilter); |
| +}; |
| + |
| +} // namespace test_runner |
| + |
| +#endif // COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_ |