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

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: Merge to LKGR. 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 ui_test_utils::WindowedNotificationObserver load_failed_observer( 384 ui_test_utils::WindowedNotificationObserver load_failed_observer(
384 content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, 385 content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
385 content::NotificationService::AllSources()); 386 content::NotificationService::AllSources());
386 387
387 // Simulate user clicking on back button (crbug.com/39248). 388 // Simulate user clicking on back button (crbug.com/39248).
388 browser()->GoBack(CURRENT_TAB); 389 browser()->GoBack(CURRENT_TAB);
389 390
390 // Wait until we hear the load failure, and make sure we haven't swapped out 391 // Wait until we hear the load failure, and make sure we haven't swapped out
391 // the previous page. Prevents regression of http://crbug.com/82667. 392 // the previous page. Prevents regression of http://crbug.com/82667.
392 load_failed_observer.Wait(); 393 load_failed_observer.Wait();
393 EXPECT_FALSE(tab->GetRenderViewHost()->is_swapped_out()); 394 EXPECT_FALSE(TestRenderViewHost::IsRenderViewHostSwappedOut(
395 tab->GetRenderViewHost()));
394 396
395 // We should be back at the original good page. 397 // We should be back at the original good page.
396 EXPECT_FALSE(browser()->GetSelectedWebContents()->GetInterstitialPage()); 398 EXPECT_FALSE(browser()->GetSelectedWebContents()->GetInterstitialPage());
397 CheckUnauthenticatedState(tab); 399 CheckUnauthenticatedState(tab);
398 } 400 }
399 401
400 // Visits a page with https error and then goes back using GoToOffset. 402 // Visits a page with https error and then goes back using GoToOffset.
401 // Disabled because its flaky: http://crbug.com/40932, http://crbug.com/43575. 403 // Disabled because its flaky: http://crbug.com/40932, http://crbug.com/43575.
402 IN_PROC_BROWSER_TEST_F(SSLUITest, 404 IN_PROC_BROWSER_TEST_F(SSLUITest,
403 TestHTTPSExpiredCertAndGoBackViaMenu) { 405 TestHTTPSExpiredCertAndGoBackViaMenu) {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 1330
1329 // Visit a page over https that contains a frame with a redirect. 1331 // Visit a page over https that contains a frame with a redirect.
1330 1332
1331 // XMLHttpRequest insecure content in synchronous mode. 1333 // XMLHttpRequest insecure content in synchronous mode.
1332 1334
1333 // XMLHttpRequest insecure content in asynchronous mode. 1335 // XMLHttpRequest insecure content in asynchronous mode.
1334 1336
1335 // XMLHttpRequest over bad ssl in synchronous mode. 1337 // XMLHttpRequest over bad ssl in synchronous mode.
1336 1338
1337 // XMLHttpRequest over OK ssl in synchronous mode. 1339 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW
« no previous file with comments | « chrome/browser/sessions/restore_tab_helper.cc ('k') | chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698