Index: chrome/browser/translate/translate_browsertest.cc |
diff --git a/chrome/browser/translate/translate_browsertest.cc b/chrome/browser/translate/translate_browsertest.cc |
index 55629afd8ac1d15620b1ae28ed7a030e2e84f0a4..a71e94b7704cd75b538239e28ad052dc24a0a2b3 100644 |
--- a/chrome/browser/translate/translate_browsertest.cc |
+++ b/chrome/browser/translate/translate_browsertest.cc |
@@ -31,6 +31,8 @@ const char kNonSecurePrefix[] = "files/translate/"; |
const char kSecurePrefix[] = "files/"; |
const char kFrenchTestPath[] = "fr_test.html"; |
const char kRefreshMetaTagTestPath[] = "refresh_meta_tag.html"; |
+const char kRefreshMetaTagCaseInsensitiveTestPath[] = |
+ "refresh_meta_tag_casei.html"; |
const char kRefreshMetaTagAtOnloadTestPath[] = |
"refresh_meta_tag_at_onload.html"; |
const char kUpdateLocationTestPath[] = "update_location.html"; |
@@ -168,6 +170,37 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { |
ASSERT_EQ(0U, infobar_service->infobar_count()); |
} |
+IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, |
+ IgnoreRefreshMetaTagInCaseInsensitive) { |
+ ASSERT_TRUE(test_server()->Start()); |
+ |
+ content::WebContents* web_contents = |
+ browser()->tab_strip_model()->GetActiveWebContents(); |
+ ASSERT_TRUE(web_contents); |
+ |
+ // Check infobar count. |
+ InfoBarService* infobar_service = |
+ InfoBarService::FromWebContents(web_contents); |
+ ASSERT_TRUE(infobar_service); |
+ ASSERT_EQ(0U, infobar_service->infobar_count()); |
+ |
+ // Setup page title observer. |
+ content::TitleWatcher watcher(web_contents, ASCIIToUTF16("PASS")); |
+ watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); |
+ |
+ // Visit a test page. |
+ ui_test_utils::NavigateToURL( |
+ browser(), |
+ GetNonSecureURL(kRefreshMetaTagCaseInsensitiveTestPath)); |
+ |
+ // Wait for the page title is changed after the test finished. |
+ const string16 result = watcher.WaitAndGetTitle(); |
+ EXPECT_TRUE(EqualsASCII(result, "PASS")); |
sky
2013/05/28 14:28:49
EXPECT_EQ("PASS", UTF16ToASCII(result))
typically
Takashi Toyoshima
2013/05/28 23:58:03
Done.
|
+ |
+ // Check there is not infobar. |
+ ASSERT_EQ(0U, infobar_service->infobar_count()); |
Takashi Toyoshima
2013/05/28 23:58:03
Also, this infobar_count() check should not be ASS
|
+} |
+ |
IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTagAtOnload) { |
ASSERT_TRUE(test_server()->Start()); |