Index: chrome/test/base/in_process_browser_test.h |
diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h |
index ae3d8e9c57a5ef4c1daaf139ca6b89195d17e558..efa5101affdd19590bda0080cffbaa5c0b070c9b 100644 |
--- a/chrome/test/base/in_process_browser_test.h |
+++ b/chrome/test/base/in_process_browser_test.h |
@@ -14,6 +14,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/test/browser_test.h" |
#include "content/public/test/browser_test_base.h" |
+#include "content/public/test/content_browser_test_utils.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/base/page_transition_types.h" |
@@ -158,6 +159,10 @@ class InProcessBrowserTest : public content::BrowserTestBase { |
// successful. |
virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; |
+ // After the test, assert whether CSP error messages should've shown up during |
+ // the test. Default false. If you expect these errors, set to true. |
+ void SetExpectCSPErrorMessages(bool expect); |
+ |
// BrowserTestBase: |
void RunTestOnMainThreadLoop() override; |
@@ -247,6 +252,11 @@ class InProcessBrowserTest : public content::BrowserTestBase { |
// True if the about:blank tab should be opened when the browser is launched. |
bool open_about_blank_on_browser_launch_; |
+ // True if CSP error messages are expected. Fail the test if not matching. |
+ bool expect_csp_messages_; |
+ |
+ content::ConsoleObserverDelegate* console_delegate_; |
+ |
// True if the accessibility test should run for a particular test case. |
// This is reset for every test case. |
bool run_accessibility_checks_for_test_case_; |