Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / interstitials / security_interstitial_page_test_utils.h
blob65a82f366dddc4696bc9d5c4b008fac9bfaf5706
1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_
6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_
8 #include <string>
10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 namespace content {
14 class InterstitialPage;
15 class WebContents;
18 class GURL;
19 class SecurityInterstitialPage;
21 namespace chrome_browser_interstitials {
23 bool IsInterstitialDisplayingText(
24 const content::InterstitialPage* const interstitial,
25 const std::string& text);
27 // This class is used for testing the display of IDN names in security
28 // interstitials.
29 class SecurityInterstitialIDNTest : public InProcessBrowserTest {
30 public:
31 // InProcessBrowserTest implementation
32 void SetUpOnMainThread() override;
34 // Run a test that creates an interstitial with an IDN request URL
35 // and checks that it is properly decoded.
36 testing::AssertionResult VerifyIDNDecoded() const;
38 protected:
39 virtual SecurityInterstitialPage* CreateInterstitial(
40 content::WebContents* contents,
41 const GURL& request_url) const = 0;
44 } // namespace chrome_browser_interstitials
46 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_