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

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

Issue 2044233002: Remove download resumption feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 }; 411 };
412 412
413 struct FileErrorInjectInfo { 413 struct FileErrorInjectInfo {
414 DownloadInfo download_info; 414 DownloadInfo download_info;
415 content::TestFileErrorInjector::FileErrorInfo error_info; 415 content::TestFileErrorInjector::FileErrorInfo error_info;
416 }; 416 };
417 417
418 DownloadTest() {} 418 DownloadTest() {}
419 419
420 void SetUpOnMainThread() override { 420 void SetUpOnMainThread() override {
421 base::FeatureList::ClearInstanceForTesting();
422 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
423 feature_list->InitializeFromCommandLine(
424 features::kDownloadResumption.name, std::string());
425 base::FeatureList::SetInstance(std::move(feature_list));
426 BrowserThread::PostTask( 421 BrowserThread::PostTask(
427 BrowserThread::IO, FROM_HERE, 422 BrowserThread::IO, FROM_HERE,
428 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 423 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
429 ASSERT_TRUE(InitialSetup()); 424 ASSERT_TRUE(InitialSetup());
430 } 425 }
431 426
432 void TearDownOnMainThread() override { 427 void TearDownOnMainThread() override {
433 // Needs to be torn down on the main thread. file_activity_observer_ holds a 428 // Needs to be torn down on the main thread. file_activity_observer_ holds a
434 // reference to the ChromeDownloadManagerDelegate which should be destroyed 429 // reference to the ChromeDownloadManagerDelegate which should be destroyed
435 // on the UI thread. 430 // on the UI thread.
(...skipping 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 DangerousDownloadWaiter( 3664 DangerousDownloadWaiter(
3670 browser(), 1, 3665 browser(), 1,
3671 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); 3666 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY));
3672 ui_test_utils::NavigateToURL(browser(), extension_url); 3667 ui_test_utils::NavigateToURL(browser(), extension_url);
3673 3668
3674 observer->WaitForFinished(); 3669 observer->WaitForFinished();
3675 3670
3676 // Download shelf should close. 3671 // Download shelf should close.
3677 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); 3672 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible());
3678 } 3673 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698