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

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

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: rebase Created 3 years, 5 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 // 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 Browser* current_browser() { return current_browser_; } 311 Browser* current_browser() { return current_browser_; }
312 312
313 // InProcessBrowserTest 313 // InProcessBrowserTest
314 void SetUpOnMainThread() override { 314 void SetUpOnMainThread() override {
315 ExtensionApiTest::SetUpOnMainThread(); 315 ExtensionApiTest::SetUpOnMainThread();
316 BrowserThread::PostTask( 316 BrowserThread::PostTask(
317 BrowserThread::IO, FROM_HERE, 317 BrowserThread::IO, FROM_HERE,
318 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 318 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
319 InProcessBrowserTest::SetUpOnMainThread();
320 GoOnTheRecord(); 319 GoOnTheRecord();
321 CreateAndSetDownloadsDirectory(); 320 CreateAndSetDownloadsDirectory();
322 current_browser()->profile()->GetPrefs()->SetBoolean( 321 current_browser()->profile()->GetPrefs()->SetBoolean(
323 prefs::kPromptForDownload, false); 322 prefs::kPromptForDownload, false);
324 events_listener_.reset(new DownloadsEventsListener()); 323 events_listener_.reset(new DownloadsEventsListener());
325 // Disable file chooser for current profile. 324 // Disable file chooser for current profile.
326 DownloadTestFileActivityObserver observer(current_browser()->profile()); 325 DownloadTestFileActivityObserver observer(current_browser()->profile());
327 observer.EnableFileChooser(false); 326 observer.EnableFileChooser(false);
328 } 327 }
329 328
(...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after
4305 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4304 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4306 EXPECT_FALSE(warnings.empty()); 4305 EXPECT_FALSE(warnings.empty());
4307 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4306 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4308 warnings.begin()->warning_type()); 4307 warnings.begin()->warning_type());
4309 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4308 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4310 } 4309 }
4311 4310
4312 } // namespace extensions 4311 } // namespace extensions
4313 4312
4314 #endif // http://crbug.com/306144 4313 #endif // http://crbug.com/306144
OLDNEW
« no previous file with comments | « chrome/browser/domain_reliability/browsertest.cc ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698