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

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

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "chrome/browser/download/download_danger_prompt.h" 7 #include "chrome/browser/download/download_danger_prompt.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 14 matching lines...) Expand all
25 using ::testing::SaveArg; 25 using ::testing::SaveArg;
26 26
27 class DownloadDangerPromptTest : public InProcessBrowserTest { 27 class DownloadDangerPromptTest : public InProcessBrowserTest {
28 public: 28 public:
29 DownloadDangerPromptTest() 29 DownloadDangerPromptTest()
30 : prompt_(NULL), 30 : prompt_(NULL),
31 expected_action_(DownloadDangerPrompt::CANCEL), 31 expected_action_(DownloadDangerPrompt::CANCEL),
32 did_receive_callback_(false) { 32 did_receive_callback_(false) {
33 } 33 }
34 34
35 virtual ~DownloadDangerPromptTest() { 35 ~DownloadDangerPromptTest() override {}
36 }
37 36
38 // Opens a new tab and waits for navigations to finish. If there are pending 37 // Opens a new tab and waits for navigations to finish. If there are pending
39 // navigations, the constrained prompt might be dismissed when the navigation 38 // navigations, the constrained prompt might be dismissed when the navigation
40 // completes. 39 // completes.
41 void OpenNewTab() { 40 void OpenNewTab() {
42 ui_test_utils::NavigateToURLWithDisposition( 41 ui_test_utils::NavigateToURLWithDisposition(
43 browser(), GURL("about:blank"), 42 browser(), GURL("about:blank"),
44 NEW_FOREGROUND_TAB, 43 NEW_FOREGROUND_TAB,
45 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB | 44 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB |
46 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 45 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 download().NotifyObserversDownloadUpdated(); 144 download().NotifyObserversDownloadUpdated();
146 SimulatePromptAction(DownloadDangerPrompt::ACCEPT); 145 SimulatePromptAction(DownloadDangerPrompt::ACCEPT);
147 VerifyExpectations(); 146 VerifyExpectations();
148 147
149 // If the containing tab is closed, the dialog should DISMISS itself. 148 // If the containing tab is closed, the dialog should DISMISS itself.
150 OpenNewTab(); 149 OpenNewTab();
151 SetUpExpectations(DownloadDangerPrompt::DISMISS); 150 SetUpExpectations(DownloadDangerPrompt::DISMISS);
152 chrome::CloseTab(browser()); 151 chrome::CloseTab(browser());
153 VerifyExpectations(); 152 VerifyExpectations();
154 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698