1 // Copyright 2019 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 WEBLAYER_TEST_INTERSTITIAL_UTILS_H_
6 #define WEBLAYER_TEST_INTERSTITIAL_UTILS_H_
7 
8 namespace weblayer {
9 
10 class Tab;
11 
12 // Contains utilities for aiding in testing an embedder's integration of
13 // WebLayer's interstitial functionality.
14 
15 // Returns true iff a security interstitial is currently displaying in
16 // |tab|.
17 bool IsShowingSecurityInterstitial(Tab* tab);
18 
19 // Returns true iff an SSL error-related interstitial is currently displaying in
20 // |tab|.
21 bool IsShowingSSLInterstitial(Tab* tab);
22 
23 // Returns true iff a captive portal interstitial is currently displaying in
24 // |tab|.
25 bool IsShowingCaptivePortalInterstitial(Tab* tab);
26 
27 // Returns true iff a bad clock interstitial is currently displaying in |tab|.
28 bool IsShowingBadClockInterstitial(Tab* tab);
29 
30 // Returns true iff an insecure form interstitial is currently displaying in
31 // |tab|.
32 bool IsShowingInsecureFormInterstitial(Tab* tab);
33 
34 }  // namespace weblayer
35 
36 #endif  // WEBLAYER_TEST_INTERSTITIAL_UTILS_H_
37