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

Side by Side Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2209303002: binding: Moves the check for the first access to the initial document into BindingSecurity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed android_webview tests. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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
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.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698