OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); | 1884 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
1885 | 1885 |
1886 // Last activated browser should be the popup. | 1886 // Last activated browser should be the popup. |
1887 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile()); | 1887 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile()); |
1888 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents(); | 1888 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents(); |
1889 EXPECT_NE(popup, tab1); | 1889 EXPECT_NE(popup, tab1); |
1890 nav_observer.Wait(); | 1890 nav_observer.Wait(); |
1891 // Since the popup is showing an interstitial, it shouldn't have a last | 1891 // Since the popup is showing an interstitial, it shouldn't have a last |
1892 // committed entry. | 1892 // committed entry. |
1893 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry()); | 1893 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry()); |
1894 ASSERT_TRUE(popup->GetController().GetVisibleEntry()); | 1894 EXPECT_EQ(nullptr, popup->GetController().GetVisibleEntry()); |
1895 EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"), | |
1896 popup->GetController().GetVisibleEntry()->GetURL()); | |
1897 content::WaitForInterstitialAttach(popup); | 1895 content::WaitForInterstitialAttach(popup); |
1898 EXPECT_TRUE(popup->ShowingInterstitialPage()); | 1896 EXPECT_TRUE(popup->ShowingInterstitialPage()); |
1899 | 1897 |
1900 // Add another tab to make sure the browser does not exit when we close | 1898 // Add another tab to make sure the browser does not exit when we close |
1901 // the first tab. | 1899 // the first tab. |
1902 GURL url = embedded_test_server()->GetURL("/ssl/google.html"); | 1900 GURL url = embedded_test_server()->GetURL("/ssl/google.html"); |
1903 content::WindowedNotificationObserver observer( | 1901 content::WindowedNotificationObserver observer( |
1904 content::NOTIFICATION_LOAD_STOP, | 1902 content::NOTIFICATION_LOAD_STOP, |
1905 content::NotificationService::AllSources()); | 1903 content::NotificationService::AllSources()); |
1906 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); | 1904 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2997 | 2995 |
2998 // Visit a page over https that contains a frame with a redirect. | 2996 // Visit a page over https that contains a frame with a redirect. |
2999 | 2997 |
3000 // XMLHttpRequest insecure content in synchronous mode. | 2998 // XMLHttpRequest insecure content in synchronous mode. |
3001 | 2999 |
3002 // XMLHttpRequest insecure content in asynchronous mode. | 3000 // XMLHttpRequest insecure content in asynchronous mode. |
3003 | 3001 |
3004 // XMLHttpRequest over bad ssl in synchronous mode. | 3002 // XMLHttpRequest over bad ssl in synchronous mode. |
3005 | 3003 |
3006 // XMLHttpRequest over OK ssl in synchronous mode. | 3004 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |