Commit 47979a37 authored by Mustafa Emre Acer's avatar Mustafa Emre Acer Committed by Commit Bot

Re-enable SSLUITest.TestInterstitialJavaScriptProceeds

It no longer seems flaky, at least on local runs.

Bug: 396458
Change-Id: I1162035b5d2b1049d4fa22597a3bd57c05e7e00c
Reviewed-on: https://chromium-review.googlesource.com/701655Reviewed-by: default avatarAdrienne Porter Felt <felt@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506571}
parent b861eb3c
......@@ -3434,15 +3434,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITestIgnoreCertErrorsBySPKIHTTPS,
// Verifies that the interstitial can proceed, even if JavaScript is disabled.
// http://crbug.com/322948
#if defined(OS_LINUX)
// flaky http://crbug.com/396458
#define MAYBE_TestInterstitialJavaScriptProceeds \
DISABLED_TestInterstitialJavaScriptProceeds
#else
#define MAYBE_TestInterstitialJavaScriptProceeds \
TestInterstitialJavaScriptProceeds
#endif
IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestInterstitialJavaScriptProceeds) {
IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialJavaScriptProceeds) {
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_JAVASCRIPT,
CONTENT_SETTING_BLOCK);
......@@ -3454,20 +3446,20 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestInterstitialJavaScriptProceeds) {
CheckAuthenticationBrokenState(
tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL);
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&tab->GetController()));
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
content::RenderViewHost* interstitial_rvh =
interstitial_page->GetMainFrame()->GetRenderViewHost();
EXPECT_TRUE(WaitForRenderFrameReady(interstitial_page->GetMainFrame()));
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&tab->GetController()));
int result = -1;
const std::string javascript =
base::StringPrintf("window.domAutomationController.send(%d);",
security_interstitials::CMD_PROCEED);
ASSERT_TRUE(content::ExecuteScriptAndExtractInt(
interstitial_rvh, javascript, &result));
interstitial_page->GetMainFrame(), javascript, &result));
// The above will hang without the fix.
EXPECT_EQ(1, result);
observer.Wait();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment