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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1327 |
1328 CheckDownload(browser(), download_file, file); | 1328 CheckDownload(browser(), download_file, file); |
1329 | 1329 |
1330 // Check state. | 1330 // Check state. |
1331 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 1331 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
1332 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); | 1332 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); |
1333 | 1333 |
1334 // Open a second tab and wait. | 1334 // Open a second tab and wait. |
1335 EXPECT_NE(static_cast<WebContents*>(NULL), | 1335 EXPECT_NE(static_cast<WebContents*>(NULL), |
1336 chrome::AddSelectedTabWithURL(browser(), | 1336 chrome::AddSelectedTabWithURL(browser(), |
1337 GURL(content::kAboutBlankURL), | 1337 GURL(url::kAboutBlankURL), |
1338 content::PAGE_TRANSITION_TYPED)); | 1338 content::PAGE_TRANSITION_TYPED)); |
1339 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 1339 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
1340 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); | 1340 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); |
1341 | 1341 |
1342 // Hide the download shelf. | 1342 // Hide the download shelf. |
1343 browser()->window()->GetDownloadShelf()->Close(DownloadShelf::AUTOMATIC); | 1343 browser()->window()->GetDownloadShelf()->Close(DownloadShelf::AUTOMATIC); |
1344 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); | 1344 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); |
1345 | 1345 |
1346 // Go to the first tab. | 1346 // Go to the first tab. |
1347 browser()->tab_strip_model()->ActivateTabAt(0, true); | 1347 browser()->tab_strip_model()->ActivateTabAt(0, true); |
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3224 IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_GZipWithNoContent) { | 3224 IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_GZipWithNoContent) { |
3225 ASSERT_TRUE(test_server()->Start()); | 3225 ASSERT_TRUE(test_server()->Start()); |
3226 GURL url(test_server()->GetURL("files/downloads/empty.bin")); | 3226 GURL url(test_server()->GetURL("files/downloads/empty.bin")); |
3227 // Downloading the same URL twice causes the second request to be served from | 3227 // Downloading the same URL twice causes the second request to be served from |
3228 // cached (with a high probability). This test verifies that that doesn't | 3228 // cached (with a high probability). This test verifies that that doesn't |
3229 // happen regardless of whether the request is served via the cache or from | 3229 // happen regardless of whether the request is served via the cache or from |
3230 // the network. | 3230 // the network. |
3231 DownloadAndWait(browser(), url); | 3231 DownloadAndWait(browser(), url); |
3232 DownloadAndWait(browser(), url); | 3232 DownloadAndWait(browser(), url); |
3233 } | 3233 } |
OLD | NEW |