| 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/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 IN_PROC_BROWSER_TEST_F(ContentSettingsTest, RedirectLoopCookies) { | 247 IN_PROC_BROWSER_TEST_F(ContentSettingsTest, RedirectLoopCookies) { |
| 248 ASSERT_TRUE(embedded_test_server()->Start()); | 248 ASSERT_TRUE(embedded_test_server()->Start()); |
| 249 | 249 |
| 250 GURL test_url = embedded_test_server()->GetURL("/redirect-loop.html"); | 250 GURL test_url = embedded_test_server()->GetURL("/redirect-loop.html"); |
| 251 | 251 |
| 252 CookieSettingsFactory::GetForProfile(browser()->profile()) | 252 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 253 ->SetDefaultCookieSetting(CONTENT_SETTING_BLOCK); | 253 ->SetDefaultCookieSetting(CONTENT_SETTING_BLOCK); |
| 254 | 254 |
| 255 content::WebContents* web_contents = | 255 content::WebContents* web_contents = |
| 256 browser()->tab_strip_model()->GetActiveWebContents(); | 256 browser()->tab_strip_model()->GetActiveWebContents(); |
| 257 | |
| 258 MockWebContentsLoadFailObserver observer(web_contents); | 257 MockWebContentsLoadFailObserver observer(web_contents); |
| 259 EXPECT_CALL(observer, DidFinishNavigation(IsErrorTooManyRedirects())); | 258 EXPECT_CALL(observer, DidFinishNavigation(IsErrorTooManyRedirects())); |
| 260 | 259 |
| 261 ui_test_utils::NavigateToURL(browser(), test_url); | 260 ui_test_utils::NavigateToURL(browser(), test_url); |
| 262 | 261 |
| 263 ASSERT_TRUE(::testing::Mock::VerifyAndClearExpectations(&observer)); | 262 ASSERT_TRUE(::testing::Mock::VerifyAndClearExpectations(&observer)); |
| 264 | 263 |
| 265 EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)-> | 264 EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)-> |
| 266 IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 265 IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 267 } | 266 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 #endif // defined(ENABLE_PEPPER_CDMS) | 535 #endif // defined(ENABLE_PEPPER_CDMS) |
| 537 | 536 |
| 538 #if !defined(DISABLE_NACL) | 537 #if !defined(DISABLE_NACL) |
| 539 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, | 538 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, |
| 540 NaCl) { | 539 NaCl) { |
| 541 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 540 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); |
| 542 } | 541 } |
| 543 #endif // !defined(DISABLE_NACL) | 542 #endif // !defined(DISABLE_NACL) |
| 544 | 543 |
| 545 #endif // defined(ENABLE_PLUGINS) | 544 #endif // defined(ENABLE_PLUGINS) |
| OLD | NEW |