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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc

Issue 1436273002: Send safe browsing ThreatDetails to track download CTR when user tries to recover blocked downloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove extra file Created 5 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 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 // Disable everything on windows only. http://crbug.com/306144 5 // Disable everything on windows only. http://crbug.com/306144
6 #ifndef OS_WIN 6 #ifndef OS_WIN
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 4022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 // TODO(benjhayden) Test incognito. 4033 // TODO(benjhayden) Test incognito.
4034 } 4034 }
4035 4035
4036 // TODO(benjhayden) Figure out why DisableExtension() does not fire 4036 // TODO(benjhayden) Figure out why DisableExtension() does not fire
4037 // OnListenerRemoved. 4037 // OnListenerRemoved.
4038 4038
4039 // TODO(benjhayden) Test that the shelf is shown for download() both with and 4039 // TODO(benjhayden) Test that the shelf is shown for download() both with and
4040 // without a WebContents. 4040 // without a WebContents.
4041 4041
4042 void OnDangerPromptCreated(DownloadDangerPrompt* prompt) { 4042 void OnDangerPromptCreated(DownloadDangerPrompt* prompt) {
4043 prompt->InvokeActionForTesting(DownloadDangerPrompt::ACCEPT); 4043 GURL unused_url = GURL::EmptyGURL();
msw 2015/11/17 01:17:38 nit: can you just inline the default ctor below? i
Jialiu Lin 2015/11/17 02:05:50 Done.
4044 prompt->InvokeActionForTesting(DownloadDangerPrompt::ACCEPT, unused_url);
4044 } 4045 }
4045 4046
4046 #if defined(OS_MACOSX) 4047 #if defined(OS_MACOSX)
4047 // Flakily triggers and assert on Mac. 4048 // Flakily triggers and assert on Mac.
4048 // http://crbug.com/180759 4049 // http://crbug.com/180759
4049 #define MAYBE_DownloadExtensionTest_AcceptDanger DISABLED_DownloadExtensionTest_ AcceptDanger 4050 #define MAYBE_DownloadExtensionTest_AcceptDanger DISABLED_DownloadExtensionTest_ AcceptDanger
4050 #else 4051 #else
4051 #define MAYBE_DownloadExtensionTest_AcceptDanger DownloadExtensionTest_AcceptDan ger 4052 #define MAYBE_DownloadExtensionTest_AcceptDanger DownloadExtensionTest_AcceptDan ger
4052 #endif 4053 #endif
4053 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, 4054 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
4178 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4179 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4179 EXPECT_FALSE(warnings.empty()); 4180 EXPECT_FALSE(warnings.empty());
4180 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4181 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4181 warnings.begin()->warning_type()); 4182 warnings.begin()->warning_type());
4182 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4183 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4183 } 4184 }
4184 4185
4185 } // namespace extensions 4186 } // namespace extensions
4186 4187
4187 #endif // http://crbug.com/306144 4188 #endif // http://crbug.com/306144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698