Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2445)

Unified Diff: chrome/browser/interstitials/security_interstitial_page_test_utils.h

Issue 1000333003: Properly decode IDN in interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move test commands to negative values, and control flow nit Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/interstitials/security_interstitial_page_test_utils.h
diff --git a/chrome/browser/interstitials/security_interstitial_page_test_utils.h b/chrome/browser/interstitials/security_interstitial_page_test_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..34c613a7be870aea07cb916a49d1fa2b4893840e
--- /dev/null
+++ b/chrome/browser/interstitials/security_interstitial_page_test_utils.h
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_
+#define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_
+
+#include <string>
+
+#include "chrome/test/base/in_process_browser_test.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace content {
+class InterstitialPage;
+class WebContents;
+}
+
+class GURL;
+class SecurityInterstitialPage;
+
+namespace chrome_browser_interstitials {
+
+bool IsInterstitialDisplayingText(content::InterstitialPage* interstitial,
+ const std::string& text);
+
+// This class is used for testing the display of IDN names in security
+// interstitials.
+class SecurityInterstitialIDNTest : public InProcessBrowserTest {
+ public:
+ // InProcessBrowserTest implementation
+ void SetUpOnMainThread() override;
+
+ // Run a test that creates an interstitial with an IDN request URL
+ // and checks that it is properly decoded.
+ testing::AssertionResult VerifyIDNDecoded() const;
+
+ protected:
+ virtual SecurityInterstitialPage* CreateInterstitial(
+ content::WebContents* contents,
+ const GURL& request_url) const = 0;
+};
+
+} // namespace chrome_browser_interstitials
+
+#endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698