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

Side by Side Diff: content/public/test/render_view_fake_resources_test.h

Issue 10449094: Fix client-side phishing detection test flakiness and ChromeOS failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore the previous sandbox-enabled state Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // RenderViewFakeResourcesTest can be used as a base class for tests that need 5 // RenderViewFakeResourcesTest can be used as a base class for tests that need
6 // to simulate loading network resources (such as http: urls) into a 6 // to simulate loading network resources (such as http: urls) into a
7 // RenderView. It does this by handling the relevant IPC messages that the 7 // RenderView. It does this by handling the relevant IPC messages that the
8 // renderer would normally send to the browser, and responding with static 8 // renderer would normally send to the browser, and responding with static
9 // content from an internal map. A request for a url that is not in the map 9 // content from an internal map. A request for a url that is not in the map
10 // will return a 404. Currently, content is always returned as text/html, and 10 // will return a 404. Currently, content is always returned as text/html, and
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 RenderView* view_; // not owned, deletes itself on close 133 RenderView* view_; // not owned, deletes itself on close
134 134
135 // Map of url -> response body for network requests from the renderer. 135 // Map of url -> response body for network requests from the renderer.
136 // Any urls not in this map are served a 404 error. 136 // Any urls not in this map are served a 404 error.
137 std::map<std::string, std::string> responses_; 137 std::map<std::string, std::string> responses_;
138 138
139 private: 139 private:
140 // A helper for GoBack and GoForward. 140 // A helper for GoBack and GoForward.
141 void GoToOffset(int offset, const WebKit::WebHistoryItem& history_item); 141 void GoToOffset(int offset, const WebKit::WebHistoryItem& history_item);
142 142
143 // The previous state for whether sandbox support was enabled in
144 // RenderViewWebKitPlatformSupportImpl.
145 bool sandbox_was_enabled_;
146
143 DISALLOW_COPY_AND_ASSIGN(RenderViewFakeResourcesTest); 147 DISALLOW_COPY_AND_ASSIGN(RenderViewFakeResourcesTest);
144 }; 148 };
145 149
146 } // namespace content 150 } // namespace content
147 151
148 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_FAKE_RESOURCES_TEST_H_ 152 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_FAKE_RESOURCES_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698