Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 "content/public/browser/navigation_handle.h" | |
| 6 | |
| 7 #include "testing/gmock/include/gmock/gmock.h" | |
| 8 #include "url/gurl.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 // MockNavigations are instantiated with a url, and all their boolean | |
| 13 // methods return false by default. Make sure to change this mock class | |
| 14 // if you add anything to NavigationHandle. | |
| 15 class MockNavigationHandle : public NavigationHandle { | |
|
clamy
2015/09/10 12:16:24
Sorry I missed this on my last pass on the code. I
| |
| 16 public: | |
| 17 explicit MockNavigationHandle(GURL url); | |
| 18 ~MockNavigationHandle() override; | |
| 19 MOCK_CONST_METHOD0(GetURL, const GURL&()); | |
| 20 MOCK_CONST_METHOD0(GetNetErrorCode, net::Error()); | |
| 21 MOCK_CONST_METHOD0(IsInMainFrame, bool()); | |
| 22 MOCK_CONST_METHOD0(IsSamePage, bool()); | |
| 23 MOCK_CONST_METHOD0(HasCommittedDocument, bool()); | |
| 24 MOCK_CONST_METHOD0(HasCommittedErrorPage, bool()); | |
| 25 | |
| 26 private: | |
| 27 GURL url_; | |
| 28 }; | |
| 29 | |
| 30 } // namespace content | |
| OLD | NEW |