OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/loader/MixedContentChecker.h" | 5 #include "core/loader/MixedContentChecker.h" |
6 | 6 |
7 #include "core/frame/Settings.h" | 7 #include "core/frame/Settings.h" |
8 #include "core/loader/EmptyClients.h" | 8 #include "core/loader/EmptyClients.h" |
9 #include "core/testing/DummyPageHolder.h" | 9 #include "core/testing/DummyPageHolder.h" |
10 #include "platform/network/ResourceResponse.h" | 10 #include "platform/network/ResourceResponse.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 {"https://example.com/foo", "https://example.com/foo", false}, | 31 {"https://example.com/foo", "https://example.com/foo", false}, |
32 {"https://example.com/foo", "wss://example.com/foo", false}, | 32 {"https://example.com/foo", "wss://example.com/foo", false}, |
33 {"https://example.com/foo", "data:text/html,<p>Hi!</p>", false}, | 33 {"https://example.com/foo", "data:text/html,<p>Hi!</p>", false}, |
34 {"https://example.com/foo", "http://127.0.0.1/", false}, | 34 {"https://example.com/foo", "http://127.0.0.1/", false}, |
35 {"https://example.com/foo", "http://[::1]/", false}, | 35 {"https://example.com/foo", "http://[::1]/", false}, |
36 {"https://example.com/foo", "blob:https://example.com/foo", false}, | 36 {"https://example.com/foo", "blob:https://example.com/foo", false}, |
37 {"https://example.com/foo", "blob:http://example.com/foo", false}, | 37 {"https://example.com/foo", "blob:http://example.com/foo", false}, |
38 {"https://example.com/foo", "blob:null/foo", false}, | 38 {"https://example.com/foo", "blob:null/foo", false}, |
39 {"https://example.com/foo", "filesystem:https://example.com/foo", false}, | 39 {"https://example.com/foo", "filesystem:https://example.com/foo", false}, |
40 {"https://example.com/foo", "filesystem:http://example.com/foo", false}, | 40 {"https://example.com/foo", "filesystem:http://example.com/foo", false}, |
41 {"https://example.com/foo", "filesystem:null/foo", false}, | |
42 | 41 |
43 {"https://example.com/foo", "http://example.com/foo", true}, | 42 {"https://example.com/foo", "http://example.com/foo", true}, |
44 {"https://example.com/foo", "http://google.com/foo", true}, | 43 {"https://example.com/foo", "http://google.com/foo", true}, |
45 {"https://example.com/foo", "ws://example.com/foo", true}, | 44 {"https://example.com/foo", "ws://example.com/foo", true}, |
46 {"https://example.com/foo", "ws://google.com/foo", true}, | 45 {"https://example.com/foo", "ws://google.com/foo", true}, |
47 {"https://example.com/foo", "http://192.168.1.1/", true}, | 46 {"https://example.com/foo", "http://192.168.1.1/", true}, |
48 {"https://example.com/foo", "http://localhost/", true}, | 47 {"https://example.com/foo", "http://localhost/", true}, |
49 }; | 48 }; |
50 | 49 |
51 for (const auto& test : cases) { | 50 for (const auto& test : cases) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 .settings() | 131 .settings() |
133 ->strictMixedContentCheckingForPlugin())); | 132 ->strictMixedContentCheckingForPlugin())); |
134 response2.setURL(displayedUrl); | 133 response2.setURL(displayedUrl); |
135 EXPECT_CALL(*client, didDisplayContentWithCertificateErrors(displayedUrl)); | 134 EXPECT_CALL(*client, didDisplayContentWithCertificateErrors(displayedUrl)); |
136 MixedContentChecker::handleCertificateError( | 135 MixedContentChecker::handleCertificateError( |
137 &dummyPageHolder->frame(), response2, WebURLRequest::FrameTypeNone, | 136 &dummyPageHolder->frame(), response2, WebURLRequest::FrameTypeNone, |
138 requestContext); | 137 requestContext); |
139 } | 138 } |
140 | 139 |
141 } // namespace blink | 140 } // namespace blink |
OLD | NEW |