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

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

Issue 24579003: Clean up remaining unused globals (on mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: staticmedia Created 7 years, 2 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 // 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 <algorithm> 9 #include <algorithm>
10 10
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 TestSafeBrowsingDatabaseFactory db_factory_; 456 TestSafeBrowsingDatabaseFactory db_factory_;
457 TestSBProtocolManagerFactory pm_factory_; 457 TestSBProtocolManagerFactory pm_factory_;
458 458
459 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceTest); 459 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceTest);
460 }; 460 };
461 461
462 namespace { 462 namespace {
463 463
464 const char kEmptyPage[] = "files/empty.html"; 464 const char kEmptyPage[] = "files/empty.html";
465 const char kMalwareFile[] = "files/downloads/dangerous/dangerous.exe"; 465 const char kMalwareFile[] = "files/downloads/dangerous/dangerous.exe";
466 const char kMalwareIframe[] = "files/safe_browsing/malware_iframe.html";
467 const char kMalwarePage[] = "files/safe_browsing/malware.html"; 466 const char kMalwarePage[] = "files/safe_browsing/malware.html";
468 467
469 // This test goes through DownloadResourceHandler. 468 // This test goes through DownloadResourceHandler.
470 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, Malware) { 469 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, Malware) {
471 GURL url = test_server()->GetURL(kEmptyPage); 470 GURL url = test_server()->GetURL(kEmptyPage);
472 g_browser_process->safe_browsing_service()-> 471 g_browser_process->safe_browsing_service()->
473 ui_manager()->AddObserver(&observer_); 472 ui_manager()->AddObserver(&observer_);
474 473
475 // After adding the url to safebrowsing database and getfullhash result, 474 // After adding the url to safebrowsing database and getfullhash result,
476 // we should see the interstitial page. 475 // we should see the interstitial page.
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 content::WindowedNotificationObserver observer( 988 content::WindowedNotificationObserver observer(
990 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 989 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE,
991 content::Source<SafeBrowsingDatabaseManager>( 990 content::Source<SafeBrowsingDatabaseManager>(
992 sb_service_->database_manager().get())); 991 sb_service_->database_manager().get()));
993 BrowserThread::PostTask( 992 BrowserThread::PostTask(
994 BrowserThread::IO, 993 BrowserThread::IO,
995 FROM_HERE, 994 FROM_HERE,
996 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); 995 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this));
997 observer.Wait(); 996 observer.Wait();
998 } 997 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698