| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/interstitials/security_interstitial_page_test_utils.h" | 5 #include "chrome/browser/interstitials/security_interstitial_page_test_utils.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | |
| 10 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 11 #include "chrome/browser/interstitials/security_interstitial_page.h" | 10 #include "chrome/browser/interstitials/security_interstitial_page.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/security_interstitials/core/controller_client.h" | 16 #include "components/security_interstitials/core/controller_client.h" |
| 17 #include "content/public/browser/interstitial_page.h" | 17 #include "content/public/browser/interstitial_page.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 #include "content/public/test/browser_test_utils.h" | 19 #include "content/public/test/browser_test_utils.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| 23 namespace chrome_browser_interstitials { | 23 namespace chrome_browser_interstitials { |
| 24 | 24 |
| 25 bool IsInterstitialDisplayingText( | 25 bool IsInterstitialDisplayingText( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 if (!WaitForRenderFrameReady(contents->GetInterstitialPage()->GetMainFrame())) | 65 if (!WaitForRenderFrameReady(contents->GetInterstitialPage()->GetMainFrame())) |
| 66 return testing::AssertionFailure() << "Render frame not ready"; | 66 return testing::AssertionFailure() << "Render frame not ready"; |
| 67 | 67 |
| 68 if (IsInterstitialDisplayingText(contents->GetInterstitialPage(), | 68 if (IsInterstitialDisplayingText(contents->GetInterstitialPage(), |
| 69 kHostnameJSUnicode)) { | 69 kHostnameJSUnicode)) { |
| 70 return testing::AssertionSuccess(); | 70 return testing::AssertionSuccess(); |
| 71 } | 71 } |
| 72 return testing::AssertionFailure() << "Interstitial not displaying text"; | 72 return testing::AssertionFailure() << "Interstitial not displaying text"; |
| 73 } | 73 } |
| 74 } // namespace chrome_browser_interstitials | 74 } // namespace chrome_browser_interstitials |
| OLD | NEW |