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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 2496193002: Implement transfer navigation with mojo (Closed)
Patch Set: fix Created 4 years, 1 month 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 std::string response_data("<html>foobar</html>"); 2747 std::string response_data("<html>foobar</html>");
2748 2748
2749 SetResponse(raw_headers, response_data); 2749 SetResponse(raw_headers, response_data);
2750 HandleScheme("http"); 2750 HandleScheme("http");
2751 2751
2752 MakeWebContentsAssociatedTestRequestWithResourceType( 2752 MakeWebContentsAssociatedTestRequestWithResourceType(
2753 request_id, GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME); 2753 request_id, GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME);
2754 2754
2755 GlobalRequestID global_request_id(web_contents_filter_->child_id(), 2755 GlobalRequestID global_request_id(web_contents_filter_->child_id(),
2756 request_id); 2756 request_id);
2757 host_.MarkAsTransferredNavigation(global_request_id, base::Closure()); 2757 host_.MarkAsTransferredNavigation(global_request_id, {});
2758 2758
2759 // And now simulate a cancellation coming from the renderer. 2759 // And now simulate a cancellation coming from the renderer.
2760 ResourceHostMsg_CancelRequest msg(request_id); 2760 ResourceHostMsg_CancelRequest msg(request_id);
2761 host_.OnMessageReceived(msg, web_contents_filter_.get()); 2761 host_.OnMessageReceived(msg, web_contents_filter_.get());
2762 2762
2763 // Since the request is marked as being transferred, 2763 // Since the request is marked as being transferred,
2764 // the cancellation above should have been ignored and the request 2764 // the cancellation above should have been ignored and the request
2765 // should still be alive. 2765 // should still be alive.
2766 EXPECT_EQ(1, host_.pending_requests()); 2766 EXPECT_EQ(1, host_.pending_requests());
2767 2767
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3935 return nullptr; 3935 return nullptr;
3936 } 3936 }
3937 3937
3938 INSTANTIATE_TEST_CASE_P( 3938 INSTANTIATE_TEST_CASE_P(
3939 ResourceDispatcherHostTests, 3939 ResourceDispatcherHostTests,
3940 ResourceDispatcherHostTest, 3940 ResourceDispatcherHostTest,
3941 testing::Values(TestConfig::kDefault, 3941 testing::Values(TestConfig::kDefault,
3942 TestConfig::kOptimizeIPCForSmallResourceEnabled)); 3942 TestConfig::kOptimizeIPCForSmallResourceEnabled));
3943 3943
3944 } // namespace content 3944 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698