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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added browser and unit tests. Renamed 'UserActed' to 'OpenedOrShown'. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index a8a9eca778bc7557fd472d364cbfbdb39a68cf5b..9d0e6ec97cb70492c5aa5adb7f887ff37e3d9760 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_function_test_utils.h"
#include "chrome/browser/net/url_request_mock_util.h"
+#include "chrome/browser/platform_util_internal.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
@@ -325,6 +326,8 @@ class DownloadExtensionTest : public ExtensionApiTest {
// Disable file chooser for current profile.
DownloadTestFileActivityObserver observer(current_browser()->profile());
observer.EnableFileChooser(false);
+ // Prevent platform from opening files and showing folders.
+ platform_util::internal::DisableShellOperationsForTesting();
}
void GoOnTheRecord() { current_browser_ = browser(); }
« no previous file with comments | « chrome/browser/download/download_item_model_unittest.cc ('k') | chrome/browser/ntp_snippets/fake_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698