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

Side by Side Diff: content/renderer/resource_fetcher_browsertest.cc

Issue 643733002: Add RoutingIDIssuer to ensure the correctness of ID to be routed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 6 years, 2 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
« no previous file with comments | « content/renderer/dom_serializer_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/renderer/resource_fetcher.h" 5 #include "content/public/renderer/resource_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "content/public/common/url_constants.h" 14 #include "content/public/common/url_constants.h"
15 #include "content/public/renderer/render_view.h" 15 #include "content/public/renderer/render_view.h"
16 #include "content/public/test/content_browser_test.h" 16 #include "content/public/test/content_browser_test.h"
17 #include "content/public/test/content_browser_test_utils.h" 17 #include "content/public/test/content_browser_test_utils.h"
18 #include "content/public/test/routing_id_mangling_disabler.h"
18 #include "content/public/test/test_utils.h" 19 #include "content/public/test/test_utils.h"
19 #include "content/shell/browser/shell.h" 20 #include "content/shell/browser/shell.h"
20 #include "third_party/WebKit/public/platform/WebURLResponse.h" 21 #include "third_party/WebKit/public/platform/WebURLResponse.h"
21 #include "third_party/WebKit/public/web/WebFrame.h" 22 #include "third_party/WebKit/public/web/WebFrame.h"
22 #include "third_party/WebKit/public/web/WebView.h" 23 #include "third_party/WebKit/public/web/WebView.h"
23 24
24 using blink::WebFrame; 25 using blink::WebFrame;
25 using blink::WebURLRequest; 26 using blink::WebURLRequest;
26 using blink::WebURLResponse; 27 using blink::WebURLResponse;
27 28
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 WebURLRequest::RequestContextInternal, 278 WebURLRequest::RequestContextInternal,
278 WebURLRequest::FrameTypeNone, 279 WebURLRequest::FrameTypeNone,
279 ResourceFetcher::PLATFORM_LOADER, 280 ResourceFetcher::PLATFORM_LOADER,
280 delegate->NewCallback()); 281 delegate->NewCallback());
281 282
282 delegate->WaitForResponse(); 283 delegate->WaitForResponse();
283 ASSERT_TRUE(delegate->completed()); 284 ASSERT_TRUE(delegate->completed());
284 EXPECT_EQ(delegate->response().httpStatusCode(), 200); 285 EXPECT_EQ(delegate->response().httpStatusCode(), 200);
285 EXPECT_EQ(kHeader, delegate->data()); 286 EXPECT_EQ(kHeader, delegate->data());
286 } 287 }
288
289 content::RoutingIDManglingDisabler routing_id_mangling_disabler_;
287 }; 290 };
288 291
289 #if defined(OS_ANDROID) 292 #if defined(OS_ANDROID)
290 // Disable (http://crbug.com/248796). 293 // Disable (http://crbug.com/248796).
291 #define MAYBE_ResourceFetcher404 DISABLED_ResourceFetcher404 294 #define MAYBE_ResourceFetcher404 DISABLED_ResourceFetcher404
292 #define MAYBE_ResourceFetcherDeletedInCallback \ 295 #define MAYBE_ResourceFetcherDeletedInCallback \
293 DISABLED_ResourceFetcherDeletedInCallback 296 DISABLED_ResourceFetcherDeletedInCallback
294 #define MAYBE_ResourceFetcherTimeout DISABLED_ResourceFetcherTimeout 297 #define MAYBE_ResourceFetcherTimeout DISABLED_ResourceFetcherTimeout
295 #define MAYBE_ResourceFetcherDownload DISABLED_ResourceFetcherDownload 298 #define MAYBE_ResourceFetcherDownload DISABLED_ResourceFetcherDownload
296 // Disable (http://crbug.com/341142). 299 // Disable (http://crbug.com/341142).
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 ASSERT_TRUE(test_server()->Start()); 401 ASSERT_TRUE(test_server()->Start());
399 GURL url(test_server()->GetURL("echoheader?header")); 402 GURL url(test_server()->GetURL("echoheader?header"));
400 403
401 PostTaskToInProcessRendererAndWait( 404 PostTaskToInProcessRendererAndWait(
402 base::Bind( 405 base::Bind(
403 &ResourceFetcherTests::ResourceFetcherSetHeader, 406 &ResourceFetcherTests::ResourceFetcherSetHeader,
404 base::Unretained(this), url)); 407 base::Unretained(this), url));
405 } 408 }
406 409
407 } // namespace content 410 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_serializer_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698