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

Unified Diff: content/public/test/mock_navigation_handle.h

Issue 1312213010: PageLoadMetrics renderer and browser implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added gmock dependency to browser/ Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/mock_navigation_handle.h
diff --git a/content/public/test/mock_navigation_handle.h b/content/public/test/mock_navigation_handle.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2151ed061ebded23e0e72f2866401620f59029b
--- /dev/null
+++ b/content/public/test/mock_navigation_handle.h
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/browser/navigation_handle.h"
+
+#include "testing/gmock/include/gmock/gmock.h"
+#include "url/gurl.h"
+
+namespace content {
+
+// MockNavigations are instantiated with a url, and all their boolean
+// methods return false by default. Make sure to change this mock class
+// if you add anything to NavigationHandle.
+class MockNavigationHandle : public NavigationHandle {
clamy 2015/09/10 12:16:24 Sorry I missed this on my last pass on the code. I
+ public:
+ explicit MockNavigationHandle(GURL url);
+ ~MockNavigationHandle() override;
+ MOCK_CONST_METHOD0(GetURL, const GURL&());
+ MOCK_CONST_METHOD0(GetNetErrorCode, net::Error());
+ MOCK_CONST_METHOD0(IsInMainFrame, bool());
+ MOCK_CONST_METHOD0(IsSamePage, bool());
+ MOCK_CONST_METHOD0(HasCommittedDocument, bool());
+ MOCK_CONST_METHOD0(HasCommittedErrorPage, bool());
+
+ private:
+ GURL url_;
+};
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698