untrusted_web_ui_browsertest_util.h 986 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2020 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. #ifndef UI_WEBUI_UNTRUSTED_WEB_UI_BROWSERTEST_UTIL_H_
  5. #define UI_WEBUI_UNTRUSTED_WEB_UI_BROWSERTEST_UTIL_H_
  6. #include "content/public/browser/webui_config.h"
  7. #include "content/public/test/web_ui_browsertest_util.h"
  8. namespace content {
  9. class WebUIController;
  10. }
  11. namespace ui {
  12. class TestUntrustedWebUIConfig : public content::WebUIConfig {
  13. public:
  14. explicit TestUntrustedWebUIConfig(base::StringPiece host);
  15. TestUntrustedWebUIConfig(
  16. base::StringPiece host,
  17. const content::TestUntrustedDataSourceHeaders& headers);
  18. ~TestUntrustedWebUIConfig() override;
  19. std::unique_ptr<content::WebUIController> CreateWebUIController(
  20. content::WebUI* web_ui) override;
  21. const content::TestUntrustedDataSourceHeaders headers_;
  22. };
  23. } // namespace ui
  24. #endif // UI_WEBUI_UNTRUSTED_WEB_UI_BROWSERTEST_UTIL_H_