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 #ifndef CHROME_BROWSER_UI_WEBUI_DOWNLOADS_MOCK_DOWNLOADS_PAGE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_MOCK_DOWNLOADS_PAGE_H_ 7 8 #include <vector> 9 10 #include "chrome/browser/ui/webui/downloads/downloads.mojom.h" 11 #include "mojo/public/cpp/bindings/pending_remote.h" 12 #include "mojo/public/cpp/bindings/receiver.h" 13 #include "testing/gmock/include/gmock/gmock.h" 14 15 class MockPage : public downloads::mojom::Page { 16 public: 17 MockPage(); 18 ~MockPage() override; 19 20 mojo::PendingRemote<downloads::mojom::Page> BindAndGetRemote(); 21 22 MOCK_METHOD1(RemoveItem, void(int)); 23 MOCK_METHOD2(UpdateItem, void(int, downloads::mojom::DataPtr)); 24 MOCK_METHOD2(InsertItems, void(int, std::vector<downloads::mojom::DataPtr>)); 25 MOCK_METHOD0(ClearAll, void()); 26 27 mojo::Receiver<downloads::mojom::Page> receiver_{this}; 28 }; 29 30 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_MOCK_DOWNLOADS_PAGE_H_ 31