Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 1637943003: Remove HostDesktopType from BrowserList::GetInstance() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen-wrapper-land
Patch Set: mac2 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/download/download_browsertest.h" 5 #include "chrome/browser/download/download_browsertest.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <sstream> 8 #include <sstream>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 ASSERT_EQ(1UL, download_items.size()); 1387 ASSERT_EQ(1UL, download_items.size());
1388 ASSERT_EQ(base::FilePath(FILE_PATH_LITERAL("a_zip_file.zip")), 1388 ASSERT_EQ(base::FilePath(FILE_PATH_LITERAL("a_zip_file.zip")),
1389 download_items[0]->GetTargetFilePath().BaseName()); 1389 download_items[0]->GetTargetFilePath().BaseName());
1390 ASSERT_TRUE(base::PathExists(download_items[0]->GetTargetFilePath())); 1390 ASSERT_TRUE(base::PathExists(download_items[0]->GetTargetFilePath()));
1391 EXPECT_TRUE(VerifyFile(download_items[0]->GetTargetFilePath(), 1391 EXPECT_TRUE(VerifyFile(download_items[0]->GetTargetFilePath(),
1392 original_contents, origin_file_size)); 1392 original_contents, origin_file_size));
1393 1393
1394 // Setup an incognito window. 1394 // Setup an incognito window.
1395 Browser* incognito = CreateIncognitoBrowser(); 1395 Browser* incognito = CreateIncognitoBrowser();
1396 ASSERT_TRUE(incognito); 1396 ASSERT_TRUE(incognito);
1397 int window_count = BrowserList::GetInstance( 1397 int window_count = BrowserList::GetInstance()->size();
1398 browser()->host_desktop_type())->size();
1399 EXPECT_EQ(2, window_count); 1398 EXPECT_EQ(2, window_count);
1400 incognito->profile()->GetPrefs()->SetFilePath( 1399 incognito->profile()->GetPrefs()->SetFilePath(
1401 prefs::kDownloadDefaultDirectory, 1400 prefs::kDownloadDefaultDirectory,
1402 GetDownloadsDirectory()); 1401 GetDownloadsDirectory());
1403 incognito->profile()->GetPrefs()->SetFilePath( 1402 incognito->profile()->GetPrefs()->SetFilePath(
1404 prefs::kSaveFileDefaultDirectory, 1403 prefs::kSaveFileDefaultDirectory,
1405 GetDownloadsDirectory()); 1404 GetDownloadsDirectory());
1406 1405
1407 download_items.clear(); 1406 download_items.clear();
1408 GetDownloads(incognito, &download_items); 1407 GetDownloads(incognito, &download_items);
(...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 3636
3638 scoped_ptr<content::DownloadTestObserver> observer(DangerousDownloadWaiter( 3637 scoped_ptr<content::DownloadTestObserver> observer(DangerousDownloadWaiter(
3639 browser(), 1, content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); 3638 browser(), 1, content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY));
3640 ui_test_utils::NavigateToURL(browser(), extension_url); 3639 ui_test_utils::NavigateToURL(browser(), extension_url);
3641 3640
3642 observer->WaitForFinished(); 3641 observer->WaitForFinished();
3643 3642
3644 // Download shelf should close. 3643 // Download shelf should close.
3645 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); 3644 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible());
3646 } 3645 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698