| OLD | NEW |
| 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/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "content/public/test/test_utils.h" | 73 #include "content/public/test/test_utils.h" |
| 74 #include "content/shell/browser/shell.h" | 74 #include "content/shell/browser/shell.h" |
| 75 #include "content/test/content_browser_test_utils_internal.h" | 75 #include "content/test/content_browser_test_utils_internal.h" |
| 76 #include "ipc/ipc.mojom.h" | 76 #include "ipc/ipc.mojom.h" |
| 77 #include "ipc/ipc_security_test_util.h" | 77 #include "ipc/ipc_security_test_util.h" |
| 78 #include "mojo/public/cpp/bindings/strong_binding.h" | 78 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 79 #include "net/dns/mock_host_resolver.h" | 79 #include "net/dns/mock_host_resolver.h" |
| 80 #include "net/test/embedded_test_server/embedded_test_server.h" | 80 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 81 #include "net/test/embedded_test_server/http_request.h" | 81 #include "net/test/embedded_test_server/http_request.h" |
| 82 #include "net/test/embedded_test_server/http_response.h" | 82 #include "net/test/embedded_test_server/http_response.h" |
| 83 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" |
| 83 #include "testing/gmock/include/gmock/gmock.h" | 84 #include "testing/gmock/include/gmock/gmock.h" |
| 84 #include "testing/gtest/include/gtest/gtest.h" | 85 #include "testing/gtest/include/gtest/gtest.h" |
| 85 #include "third_party/WebKit/public/platform/WebFeaturePolicy.h" | 86 #include "third_party/WebKit/public/platform/WebFeaturePolicy.h" |
| 86 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 87 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 87 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" | 88 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" |
| 88 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 89 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
| 89 #include "ui/display/display_switches.h" | 90 #include "ui/display/display_switches.h" |
| 90 #include "ui/display/screen.h" | 91 #include "ui/display/screen.h" |
| 91 #include "ui/events/base_event_utils.h" | 92 #include "ui/events/base_event_utils.h" |
| 92 #include "ui/events/event.h" | 93 #include "ui/events/event.h" |
| (...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 class FailingLoadFactory : public mojom::URLLoaderFactory { | 2404 class FailingLoadFactory : public mojom::URLLoaderFactory { |
| 2404 public: | 2405 public: |
| 2405 FailingLoadFactory() {} | 2406 FailingLoadFactory() {} |
| 2406 ~FailingLoadFactory() override {} | 2407 ~FailingLoadFactory() override {} |
| 2407 | 2408 |
| 2408 void CreateLoaderAndStart(mojom::URLLoaderRequest loader, | 2409 void CreateLoaderAndStart(mojom::URLLoaderRequest loader, |
| 2409 int32_t routing_id, | 2410 int32_t routing_id, |
| 2410 int32_t request_id, | 2411 int32_t request_id, |
| 2411 uint32_t options, | 2412 uint32_t options, |
| 2412 const ResourceRequest& request, | 2413 const ResourceRequest& request, |
| 2413 mojom::URLLoaderClientPtr client) override { | 2414 mojom::URLLoaderClientPtr client, |
| 2415 const net::MutableNetworkTrafficAnnotationTag& |
| 2416 traffic_annotation) override { |
| 2414 new FailingURLLoaderImpl(std::move(client)); | 2417 new FailingURLLoaderImpl(std::move(client)); |
| 2415 } | 2418 } |
| 2416 void SyncLoad(int32_t routing_id, | 2419 void SyncLoad(int32_t routing_id, |
| 2417 int32_t request_id, | 2420 int32_t request_id, |
| 2418 const ResourceRequest& request, | 2421 const ResourceRequest& request, |
| 2419 SyncLoadCallback callback) override {} | 2422 SyncLoadCallback callback) override {} |
| 2420 }; | 2423 }; |
| 2421 } | 2424 } |
| 2422 | 2425 |
| 2423 // Ensure that a cross-site page ends up in the correct process when it | 2426 // Ensure that a cross-site page ends up in the correct process when it |
| (...skipping 7757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10181 // Go back again. This should go to foo.com. | 10184 // Go back again. This should go to foo.com. |
| 10182 { | 10185 { |
| 10183 TestNavigationObserver back_observer(web_contents()); | 10186 TestNavigationObserver back_observer(web_contents()); |
| 10184 web_contents()->GetController().GoBack(); | 10187 web_contents()->GetController().GoBack(); |
| 10185 back_observer.Wait(); | 10188 back_observer.Wait(); |
| 10186 } | 10189 } |
| 10187 EXPECT_EQ(foo_url, web_contents()->GetMainFrame()->GetLastCommittedURL()); | 10190 EXPECT_EQ(foo_url, web_contents()->GetMainFrame()->GetLastCommittedURL()); |
| 10188 } | 10191 } |
| 10189 | 10192 |
| 10190 } // namespace content | 10193 } // namespace content |
| OLD | NEW |