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

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

Issue 2259773002: binding: Moves the check for the first access to the initial document into BindingSecurity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 popup_observer.Wait(); 1889 popup_observer.Wait();
1890 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); 1890 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile()));
1891 1891
1892 // Last activated browser should be the popup. 1892 // Last activated browser should be the popup.
1893 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile()); 1893 Browser* popup_browser = chrome::FindBrowserWithProfile(browser()->profile());
1894 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents(); 1894 WebContents* popup = popup_browser->tab_strip_model()->GetActiveWebContents();
1895 EXPECT_NE(popup, tab1); 1895 EXPECT_NE(popup, tab1);
1896 nav_observer.Wait(); 1896 nav_observer.Wait();
1897 // Since the popup is showing an interstitial, it shouldn't have a last 1897 // Since the popup is showing an interstitial, it shouldn't have a last
1898 // committed entry. 1898 // committed entry.
1899 content::WaitForInterstitialAttach(popup);
1899 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry()); 1900 EXPECT_FALSE(popup->GetController().GetLastCommittedEntry());
1900 ASSERT_TRUE(popup->GetController().GetVisibleEntry()); 1901 ASSERT_TRUE(popup->GetController().GetVisibleEntry());
1901 EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"), 1902 EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"),
1902 popup->GetController().GetVisibleEntry()->GetURL()); 1903 popup->GetController().GetVisibleEntry()->GetURL());
1903 content::WaitForInterstitialAttach(popup);
1904 EXPECT_TRUE(popup->ShowingInterstitialPage()); 1904 EXPECT_TRUE(popup->ShowingInterstitialPage());
1905 1905
1906 // Add another tab to make sure the browser does not exit when we close 1906 // Add another tab to make sure the browser does not exit when we close
1907 // the first tab. 1907 // the first tab.
1908 GURL url = embedded_test_server()->GetURL("/ssl/google.html"); 1908 GURL url = embedded_test_server()->GetURL("/ssl/google.html");
1909 content::WindowedNotificationObserver observer( 1909 content::WindowedNotificationObserver observer(
1910 content::NOTIFICATION_LOAD_STOP, 1910 content::NOTIFICATION_LOAD_STOP,
1911 content::NotificationService::AllSources()); 1911 content::NotificationService::AllSources());
1912 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); 1912 chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED);
1913 observer.Wait(); 1913 observer.Wait();
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 3022
3023 // Visit a page over https that contains a frame with a redirect. 3023 // Visit a page over https that contains a frame with a redirect.
3024 3024
3025 // XMLHttpRequest insecure content in synchronous mode. 3025 // XMLHttpRequest insecure content in synchronous mode.
3026 3026
3027 // XMLHttpRequest insecure content in asynchronous mode. 3027 // XMLHttpRequest insecure content in asynchronous mode.
3028 3028
3029 // XMLHttpRequest over bad ssl in synchronous mode. 3029 // XMLHttpRequest over bad ssl in synchronous mode.
3030 3030
3031 // XMLHttpRequest over OK ssl in synchronous mode. 3031 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698