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

Side by Side Diff: chrome/browser/automation/url_request_slow_http_job.h

Issue 155941: Make AutomationProxyTest.NavigateToURLWithTimeout* tests not-flaky. (Closed)
Patch Set: maintainability fixes Created 11 years, 4 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 (c) 2009 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 // A URLRequestMockHTTPJob class that inserts a time delay in processing.
6
7 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_SLOW_HTTP_JOB_H_
8 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_SLOW_HTTP_JOB_H_
9
10 #include <string>
11
12 #include "base/timer.h"
13 #include "chrome/browser/automation/url_request_mock_http_job.h"
14
15 class URLRequestSlowHTTPJob : public URLRequestMockHTTPJob {
16 public:
17 URLRequestSlowHTTPJob(URLRequest* request, const FilePath& file_path);
18
19 static const int kDelayMs;
20
21 static URLRequest::ProtocolFactory Factory;
22
23 // For UI tests: adds the testing URLs to the URLRequestFilter.
24 static void AddUITestUrls(const std::wstring& base_path);
25
26 // Given the path to a file relative to base_path_, construct a mock URL.
27 static GURL GetMockUrl(const std::wstring& path);
28
29 virtual void Start();
30
31 private:
32 void RealStart();
33
34 base::OneShotTimer<URLRequestSlowHTTPJob> delay_timer_;
35
36 // This is the file path leading to the root of the directory to use as the
37 // root of the http server.
38 static std::wstring base_path_;
39 };
40
41 # endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_SLOW_HTTP_JOB_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/url_request_mock_http_job.cc ('k') | chrome/browser/automation/url_request_slow_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698