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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for initial review. Created 8 years, 9 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 | Annotate | Revision Log
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
11 #include "chrome/browser/ui/constrained_window_tab_helper.h" 11 #include "chrome/browser/ui/constrained_window_tab_helper.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
16 #include "chrome/test/base/ui_test_utils.h" 16 #include "chrome/test/base/ui_test_utils.h"
17 #include "content/browser/renderer_host/render_view_host.h" 17 #include "content/browser/renderer_host/render_view_host.h"
18 #include "content/browser/renderer_host/test_render_view_host.h"
18 #include "content/public/browser/interstitial_page.h" 19 #include "content/public/browser/interstitial_page.h"
19 #include "content/public/browser/navigation_controller.h" 20 #include "content/public/browser/navigation_controller.h"
20 #include "content/public/browser/navigation_entry.h" 21 #include "content/public/browser/navigation_entry.h"
21 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
22 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
23 #include "content/public/common/security_style.h" 24 #include "content/public/common/security_style.h"
24 #include "content/public/common/ssl_status.h" 25 #include "content/public/common/ssl_status.h"
25 #include "net/base/cert_status_flags.h" 26 #include "net/base/cert_status_flags.h"
26 #include "net/test/test_server.h" 27 #include "net/test/test_server.h"
27 28
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 ui_test_utils::WindowedNotificationObserver load_failed_observer( 385 ui_test_utils::WindowedNotificationObserver load_failed_observer(
385 content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, 386 content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
386 content::NotificationService::AllSources()); 387 content::NotificationService::AllSources());
387 388
388 // Simulate user clicking on back button (crbug.com/39248). 389 // Simulate user clicking on back button (crbug.com/39248).
389 browser()->GoBack(CURRENT_TAB); 390 browser()->GoBack(CURRENT_TAB);
390 391
391 // Wait until we hear the load failure, and make sure we haven't swapped out 392 // Wait until we hear the load failure, and make sure we haven't swapped out
392 // the previous page. Prevents regression of http://crbug.com/82667. 393 // the previous page. Prevents regression of http://crbug.com/82667.
393 load_failed_observer.Wait(); 394 load_failed_observer.Wait();
394 EXPECT_FALSE(tab->GetRenderViewHost()->is_swapped_out()); 395 EXPECT_FALSE(TestRenderViewHost::IsRenderViewHostSwappedOut(
396 tab->GetRenderViewHost()));
395 397
396 // We should be back at the original good page. 398 // We should be back at the original good page.
397 EXPECT_FALSE(browser()->GetSelectedWebContents()->GetInterstitialPage()); 399 EXPECT_FALSE(browser()->GetSelectedWebContents()->GetInterstitialPage());
398 CheckUnauthenticatedState(tab); 400 CheckUnauthenticatedState(tab);
399 } 401 }
400 402
401 // Visits a page with https error and then goes back using GoToOffset. 403 // Visits a page with https error and then goes back using GoToOffset.
402 // Disabled because its flaky: http://crbug.com/40932, http://crbug.com/43575. 404 // Disabled because its flaky: http://crbug.com/40932, http://crbug.com/43575.
403 IN_PROC_BROWSER_TEST_F(SSLUITest, 405 IN_PROC_BROWSER_TEST_F(SSLUITest,
404 DISABLED_TestHTTPSExpiredCertAndGoBackViaMenu) { 406 DISABLED_TestHTTPSExpiredCertAndGoBackViaMenu) {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 1331
1330 // Visit a page over https that contains a frame with a redirect. 1332 // Visit a page over https that contains a frame with a redirect.
1331 1333
1332 // XMLHttpRequest insecure content in synchronous mode. 1334 // XMLHttpRequest insecure content in synchronous mode.
1333 1335
1334 // XMLHttpRequest insecure content in asynchronous mode. 1336 // XMLHttpRequest insecure content in asynchronous mode.
1335 1337
1336 // XMLHttpRequest over bad ssl in synchronous mode. 1338 // XMLHttpRequest over bad ssl in synchronous mode.
1337 1339
1338 // XMLHttpRequest over OK ssl in synchronous mode. 1340 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698