| OLD | NEW |
| 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 868 |
| 869 scoped_refptr<SafeBrowsingService> sb_service_; | 869 scoped_refptr<SafeBrowsingService> sb_service_; |
| 870 | 870 |
| 871 private: | 871 private: |
| 872 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceCookieTest); | 872 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceCookieTest); |
| 873 }; | 873 }; |
| 874 | 874 |
| 875 // Test that a Safe Browsing database update request both sends cookies and can | 875 // Test that a Safe Browsing database update request both sends cookies and can |
| 876 // save cookies. | 876 // save cookies. |
| 877 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceCookieTest, TestSBUpdateCookies) { | 877 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceCookieTest, TestSBUpdateCookies) { |
| 878 ui_test_utils::WindowedNotificationObserver observer( | 878 content::WindowedNotificationObserver observer( |
| 879 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, | 879 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, |
| 880 content::Source<SafeBrowsingService>(sb_service_.get())); | 880 content::Source<SafeBrowsingService>(sb_service_.get())); |
| 881 BrowserThread::PostTask( | 881 BrowserThread::PostTask( |
| 882 BrowserThread::IO, FROM_HERE, | 882 BrowserThread::IO, FROM_HERE, |
| 883 base::Bind(&SafeBrowsingServiceCookieTest::ForceUpdate, this)); | 883 base::Bind(&SafeBrowsingServiceCookieTest::ForceUpdate, this)); |
| 884 observer.Wait(); | 884 observer.Wait(); |
| 885 } | 885 } |
| OLD | NEW |