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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 // This test creates a safebrowsing service using test safebrowsing database 5 // This test creates a safebrowsing service using test safebrowsing database
6 // and a test protocol manager. It is used to test logics in safebrowsing 6 // and a test protocol manager. It is used to test logics in safebrowsing
7 // service. 7 // service.
8 8
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
10 10
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1080
1081 WebContents* contents = 1081 WebContents* contents =
1082 browser()->tab_strip_model()->GetActiveWebContents(); 1082 browser()->tab_strip_model()->GetActiveWebContents();
1083 content::RenderFrameHost* rfh = contents->GetMainFrame(); 1083 content::RenderFrameHost* rfh = contents->GetMainFrame();
1084 content::WindowedNotificationObserver load_stop_observer( 1084 content::WindowedNotificationObserver load_stop_observer(
1085 content::NOTIFICATION_LOAD_STOP, 1085 content::NOTIFICATION_LOAD_STOP,
1086 content::Source<content::NavigationController>( 1086 content::Source<content::NavigationController>(
1087 &contents->GetController())); 1087 &contents->GetController()));
1088 // Start a browser initiated top-level navigation to a site that does not 1088 // Start a browser initiated top-level navigation to a site that does not
1089 // respond. 1089 // respond.
1090 ui_test_utils::NavigateToURLWithDisposition(browser(), third_url, CURRENT_TAB, 1090 ui_test_utils::NavigateToURLWithDisposition(
1091 ui_test_utils::BROWSER_TEST_NONE); 1091 browser(), third_url, WindowOpenDisposition::CURRENT_TAB,
1092 ui_test_utils::BROWSER_TEST_NONE);
1092 1093
1093 // While the top-level navigation is pending, run javascript 1094 // While the top-level navigation is pending, run javascript
1094 // function in the page which loads the malware image. 1095 // function in the page which loads the malware image.
1095 rfh->ExecuteJavaScriptForTests(base::ASCIIToUTF16("loadMalwareImage()")); 1096 rfh->ExecuteJavaScriptForTests(base::ASCIIToUTF16("loadMalwareImage()"));
1096 1097
1097 // Wait for interstitial to show. 1098 // Wait for interstitial to show.
1098 load_stop_observer.Wait(); 1099 load_stop_observer.Wait();
1099 1100
1100 EXPECT_TRUE(ShowingInterstitialPage()); 1101 EXPECT_TRUE(ShowingInterstitialPage());
1101 EXPECT_TRUE(got_hit_report()); 1102 EXPECT_TRUE(got_hit_report());
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 content::Source<SafeBrowsingDatabaseManager>( 1766 content::Source<SafeBrowsingDatabaseManager>(
1766 sb_factory_->test_safe_browsing_service()->database_manager().get())); 1767 sb_factory_->test_safe_browsing_service()->database_manager().get()));
1767 BrowserThread::PostTask( 1768 BrowserThread::PostTask(
1768 BrowserThread::IO, FROM_HERE, 1769 BrowserThread::IO, FROM_HERE,
1769 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, 1770 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate,
1770 base::Unretained(this))); 1771 base::Unretained(this)));
1771 observer.Wait(); 1772 observer.Wait();
1772 } 1773 }
1773 1774
1774 } // namespace safe_browsing 1775 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc ('k') | chrome/browser/safe_browsing/srt_global_error_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698