| 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 using content::BrowserThread; | 37 using content::BrowserThread; |
| 38 using content::URLRequestMockHTTPJob; | 38 using content::URLRequestMockHTTPJob; |
| 39 | 39 |
| 40 class ContentSettingsTest : public InProcessBrowserTest { | 40 class ContentSettingsTest : public InProcessBrowserTest { |
| 41 public: | 41 public: |
| 42 ContentSettingsTest() | 42 ContentSettingsTest() |
| 43 : https_server_( | 43 : https_server_( |
| 44 net::TestServer::TYPE_HTTPS, | 44 net::TestServer::TYPE_HTTPS, |
| 45 net::TestServer::SSLOptions(net::TestServer::SSLOptions::CERT_OK), | 45 net::TestServer::SSLOptions(net::TestServer::SSLOptions::CERT_OK), |
| 46 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))) { | 46 net::TestServer::GetTestDataPath()) { |
| 47 } | 47 } |
| 48 | 48 |
| 49 virtual void SetUpOnMainThread() OVERRIDE { | 49 virtual void SetUpOnMainThread() OVERRIDE { |
| 50 BrowserThread::PostTask( | 50 BrowserThread::PostTask( |
| 51 BrowserThread::IO, FROM_HERE, | 51 BrowserThread::IO, FROM_HERE, |
| 52 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); | 52 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 // Check the cookie for the given URL in an incognito window. | 55 // Check the cookie for the given URL in an incognito window. |
| 56 void CookieCheckIncognitoWindow(const GURL& url, bool cookies_enabled) { | 56 void CookieCheckIncognitoWindow(const GURL& url, bool cookies_enabled) { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost(); | 443 browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost(); |
| 444 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( | 444 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( |
| 445 host->GetProcess()->GetID()); | 445 host->GetProcess()->GetID()); |
| 446 host->Send(new ChromeViewMsg_LoadBlockedPlugins( | 446 host->Send(new ChromeViewMsg_LoadBlockedPlugins( |
| 447 host->GetRoutingID(), std::string())); | 447 host->GetRoutingID(), std::string())); |
| 448 | 448 |
| 449 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 449 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
| 450 } | 450 } |
| 451 | 451 |
| 452 #endif // !defined(USE_AURA) | 452 #endif // !defined(USE_AURA) |
| OLD | NEW |