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 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 popup_observer.Wait(); | 1947 popup_observer.Wait(); |
1948 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); | 1948 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
1949 | 1949 |
1950 // Last activated browser should be the popup. | 1950 // Last activated browser should be the popup. |
1951 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile()); | 1951 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile()); |
1952 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents(); | 1952 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents(); |
1953 EXPECT_NE(popup, tab1); | 1953 EXPECT_NE(popup, tab1); |
1954 nav_observer.Wait(); | 1954 nav_observer.Wait(); |
1955 // Since the popup is showing an interstitial, it shouldn't have a last | 1955 // Since the popup is showing an interstitial, it shouldn't have a last |
1956 // committed entry. | 1956 // committed entry. |
| 1957 content::WaitForInterstitialAttach(popup); |
1957 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry()); | 1958 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry()); |
1958 ASSERT_TRUE(popup->GetController().GetVisibleEntry()); | 1959 ASSERT_TRUE(popup->GetController().GetVisibleEntry()); |
1959 EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"), | 1960 EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"), |
1960 popup->GetController().GetVisibleEntry()->GetURL()); | 1961 popup->GetController().GetVisibleEntry()->GetURL()); |
1961 content::WaitForInterstitialAttach(popup); | |
1962 EXPECT_TRUE(popup->ShowingInterstitialPage()); | 1962 EXPECT_TRUE(popup->ShowingInterstitialPage()); |
1963 | 1963 |
1964 // Add another tab to make sure the browser does not exit when we close | 1964 // Add another tab to make sure the browser does not exit when we close |
1965 // the first tab. | 1965 // the first tab. |
1966 GURL url = embedded_test_server()->GetURL("/ssl/google.html"); | 1966 GURL url = embedded_test_server()->GetURL("/ssl/google.html"); |
1967 content::WindowedNotificationObserver observer( | 1967 content::WindowedNotificationObserver observer( |
1968 content::NOTIFICATION_LOAD_STOP, | 1968 content::NOTIFICATION_LOAD_STOP, |
1969 content::NotificationService::AllSources()); | 1969 content::NotificationService::AllSources()); |
1970 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); | 1970 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); |
1971 observer.Wait(); | 1971 observer.Wait(); |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 | 3096 |
3097 // Visit a page over https that contains a frame with a redirect. | 3097 // Visit a page over https that contains a frame with a redirect. |
3098 | 3098 |
3099 // XMLHttpRequest insecure content in synchronous mode. | 3099 // XMLHttpRequest insecure content in synchronous mode. |
3100 | 3100 |
3101 // XMLHttpRequest insecure content in asynchronous mode. | 3101 // XMLHttpRequest insecure content in asynchronous mode. |
3102 | 3102 |
3103 // XMLHttpRequest over bad ssl in synchronous mode. | 3103 // XMLHttpRequest over bad ssl in synchronous mode. |
3104 | 3104 |
3105 // XMLHttpRequest over OK ssl in synchronous mode. | 3105 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |