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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 GURL url_non_dangerous = embedded_test_server()->GetURL("/title1.html"); | 1375 GURL url_non_dangerous = embedded_test_server()->GetURL("/title1.html"); |
1376 GURL url_dangerous = | 1376 GURL url_dangerous = |
1377 https_server_expired_.GetURL("/downloads/dangerous/dangerous.exe"); | 1377 https_server_expired_.GetURL("/downloads/dangerous/dangerous.exe"); |
1378 base::ScopedTempDir downloads_directory_; | 1378 base::ScopedTempDir downloads_directory_; |
1379 | 1379 |
1380 // Need empty temp dir to avoid having Chrome ask us for a new filename | 1380 // Need empty temp dir to avoid having Chrome ask us for a new filename |
1381 // when we've downloaded dangerous.exe one hundred times. | 1381 // when we've downloaded dangerous.exe one hundred times. |
1382 ASSERT_TRUE(downloads_directory_.CreateUniqueTempDir()); | 1382 ASSERT_TRUE(downloads_directory_.CreateUniqueTempDir()); |
1383 | 1383 |
1384 browser()->profile()->GetPrefs()->SetFilePath( | 1384 browser()->profile()->GetPrefs()->SetFilePath( |
1385 prefs::kDownloadDefaultDirectory, | 1385 prefs::kDownloadDefaultDirectory, downloads_directory_.GetPath()); |
1386 downloads_directory_.path()); | |
1387 | 1386 |
1388 // Visit a non-dangerous page. | 1387 // Visit a non-dangerous page. |
1389 ui_test_utils::NavigateToURL(browser(), url_non_dangerous); | 1388 ui_test_utils::NavigateToURL(browser(), url_non_dangerous); |
1390 | 1389 |
1391 // Now, start a transition to dangerous download. | 1390 // Now, start a transition to dangerous download. |
1392 { | 1391 { |
1393 content::WindowedNotificationObserver observer( | 1392 content::WindowedNotificationObserver observer( |
1394 content::NOTIFICATION_LOAD_STOP, | 1393 content::NOTIFICATION_LOAD_STOP, |
1395 content::NotificationService::AllSources()); | 1394 content::NotificationService::AllSources()); |
1396 chrome::NavigateParams navigate_params(browser(), url_dangerous, | 1395 chrome::NavigateParams navigate_params(browser(), url_dangerous, |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3230 | 3229 |
3231 // Visit a page over https that contains a frame with a redirect. | 3230 // Visit a page over https that contains a frame with a redirect. |
3232 | 3231 |
3233 // XMLHttpRequest insecure content in synchronous mode. | 3232 // XMLHttpRequest insecure content in synchronous mode. |
3234 | 3233 |
3235 // XMLHttpRequest insecure content in asynchronous mode. | 3234 // XMLHttpRequest insecure content in asynchronous mode. |
3236 | 3235 |
3237 // XMLHttpRequest over bad ssl in synchronous mode. | 3236 // XMLHttpRequest over bad ssl in synchronous mode. |
3238 | 3237 |
3239 // XMLHttpRequest over OK ssl in synchronous mode. | 3238 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |