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

Unified Diff: chrome/browser/net/url_request_mock_link_doctor_job.h

Issue 174179: Mock the LinkDoctor for tests. Should greatly decrease ErrorPage test flakiness. (Closed)
Patch Set: sync with trunk Created 11 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
« no previous file with comments | « chrome/browser/google_util.cc ('k') | chrome/browser/net/url_request_mock_link_doctor_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/url_request_mock_link_doctor_job.h
diff --git a/chrome/browser/net/url_request_mock_link_doctor_job.h b/chrome/browser/net/url_request_mock_link_doctor_job.h
new file mode 100644
index 0000000000000000000000000000000000000000..74fd00ef75adea48e2fd3c4fcc4b43282bb8cf34
--- /dev/null
+++ b/chrome/browser/net/url_request_mock_link_doctor_job.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2009 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.
+//
+// A URLRequestJob class that substitutes LinkDoctor requests.
+
+#ifndef CHROME_BROWSER_NET_URL_REQUEST_MOCK_LINK_DOCTOR_JOB_H_
+#define CHROME_BROWSER_NET_URL_REQUEST_MOCK_LINK_DOCTOR_JOB_H_
+
+#include "chrome/browser/net/url_request_mock_http_job.h"
+
+class URLRequestMockLinkDoctorJob : public URLRequestMockHTTPJob {
+ public:
+ URLRequestMockLinkDoctorJob(URLRequest* request);
+ virtual ~URLRequestMockLinkDoctorJob() { }
+
+ static URLRequest::ProtocolFactory Factory;
+
+ // Adds the testing URLs to the URLRequestFilter.
+ static void AddUrlHandler();
+};
+
+# endif // CHROME_BROWSER_NET_URL_REQUEST_MOCK_LINK_DOCTOR_JOB_H_
« no previous file with comments | « chrome/browser/google_util.cc ('k') | chrome/browser/net/url_request_mock_link_doctor_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698