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

Side by Side Diff: third_party/WebKit/Source/core/loader/PingLoaderTest.cpp

Issue 2655143002: Drop replacesCurrentHistoryItem, NavigationType (Closed)
Patch Set: More compile fixes Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/PingLoader.h" 5 #include "core/loader/PingLoader.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "core/loader/EmptyClients.h" 8 #include "core/loader/EmptyClients.h"
9 #include "core/loader/FrameLoader.h" 9 #include "core/loader/FrameLoader.h"
10 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
11 #include "platform/loader/fetch/SubstituteData.h" 11 #include "platform/loader/fetch/SubstituteData.h"
12 #include "platform/testing/URLTestHelpers.h" 12 #include "platform/testing/URLTestHelpers.h"
13 #include "platform/testing/UnitTestHelpers.h" 13 #include "platform/testing/UnitTestHelpers.h"
14 #include "platform/weborigin/KURL.h" 14 #include "platform/weborigin/KURL.h"
15 #include "public/platform/Platform.h" 15 #include "public/platform/Platform.h"
16 #include "public/platform/WebURLLoaderMockFactory.h" 16 #include "public/platform/WebURLLoaderMockFactory.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace blink { 19 namespace blink {
20 20
21 namespace { 21 namespace {
22 22
23 class PingFrameLoaderClient : public EmptyFrameLoaderClient { 23 class PingFrameLoaderClient : public EmptyFrameLoaderClient {
24 public: 24 public:
25 void dispatchWillSendRequest(ResourceRequest& request) override { 25 void willSendRequest(ResourceRequest& request, FrameLoadType) override {
26 if (request.httpContentType() == "text/ping") 26 if (request.httpContentType() == "text/ping")
27 m_pingRequest = request; 27 m_pingRequest = request;
28 } 28 }
29 29
30 const ResourceRequest& pingRequest() const { return m_pingRequest; } 30 const ResourceRequest& pingRequest() const { return m_pingRequest; }
31 31
32 private: 32 private:
33 ResourceRequest m_pingRequest; 33 ResourceRequest m_pingRequest;
34 }; 34 };
35 35
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 TEST_F(PingLoaderTest, NonHTTPPingTarget) { 93 TEST_F(PingLoaderTest, NonHTTPPingTarget) {
94 setDocumentURL(KURL(ParsedURLString, "http://127.0.0.1:8000/foo.html")); 94 setDocumentURL(KURL(ParsedURLString, "http://127.0.0.1:8000/foo.html"));
95 const ResourceRequest& pingRequest = 95 const ResourceRequest& pingRequest =
96 pingAndGetRequest(KURL(ParsedURLString, "ftp://localhost/bar.html")); 96 pingAndGetRequest(KURL(ParsedURLString, "ftp://localhost/bar.html"));
97 ASSERT_TRUE(pingRequest.isNull()); 97 ASSERT_TRUE(pingRequest.isNull());
98 } 98 }
99 99
100 } // namespace 100 } // namespace
101 101
102 } // namespace blink 102 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoaderTypes.h ('k') | third_party/WebKit/Source/core/timing/PerformanceBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698