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

Side by Side Diff: chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler_unittest.cc

Issue 1610483003: MD Downloads: check for removed files on page load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h"
6
7 #include "chrome/test/base/testing_profile.h"
8 #include "content/public/test/mock_download_manager.h"
9 #include "content/public/test/test_browser_thread_bundle.h"
10 #include "content/public/test/test_web_ui.h"
11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13
14 TEST(MdDownloadsDOMHandlerTest, ChecksForRemovedFiles) {
15 content::TestBrowserThreadBundle thread_bundle;
16 TestingProfile profile;
17
18 testing::NiceMock<content::MockDownloadManager> manager;
19 ON_CALL(manager, GetBrowserContext()).WillByDefault(
20 testing::Return(&profile));
21
22 content::TestWebUI web_ui;
23
24 EXPECT_CALL(manager, CheckForHistoryFilesRemoval());
25 MdDownloadsDOMHandler handler(&manager, &web_ui);
26
27 testing::Mock::VerifyAndClear(&manager);
28
29 EXPECT_CALL(manager, CheckForHistoryFilesRemoval());
30 handler.RenderViewReused(nullptr);
31 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698