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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp

Issue 2377253002: Add explicit to core/fetch, core/loader and modules/websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 std::unique_ptr<scheduler::FakeWebTaskRunner> m_runner; 98 std::unique_ptr<scheduler::FakeWebTaskRunner> m_runner;
99 bool m_complete; 99 bool m_complete;
100 long long m_transferSize; 100 long long m_transferSize;
101 }; 101 };
102 102
103 class ResourceFetcherTest : public ::testing::Test { 103 class ResourceFetcherTest : public ::testing::Test {
104 }; 104 };
105 105
106 class TestResourceFactory : public ResourceFactory { 106 class TestResourceFactory : public ResourceFactory {
107 public: 107 public:
108 TestResourceFactory(Resource::Type type = Resource::Raw) 108 explicit TestResourceFactory(Resource::Type type = Resource::Raw)
109 : ResourceFactory(type) { } 109 : ResourceFactory(type) { }
110 110
111 Resource* create(const ResourceRequest& request, const ResourceLoaderOptions & options, const String& charset) const override 111 Resource* create(const ResourceRequest& request, const ResourceLoaderOptions & options, const String& charset) const override
112 { 112 {
113 return Resource::create(request, type(), options); 113 return Resource::create(request, type(), options);
114 } 114 }
115 }; 115 };
116 116
117 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach) 117 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach)
118 { 118 {
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 FetchRequest fetchRequest = FetchRequest(url, FetchInitiatorInfo()); 677 FetchRequest fetchRequest = FetchRequest(url, FetchInitiatorInfo());
678 Platform::current()->getURLLoaderMockFactory()->registerURL(url, WebURLRespo nse(), ""); 678 Platform::current()->getURLLoaderMockFactory()->registerURL(url, WebURLRespo nse(), "");
679 Resource* newResource = fetcher->requestResource(fetchRequest, TestResourceF actory(Resource::Raw)); 679 Resource* newResource = fetcher->requestResource(fetchRequest, TestResourceF actory(Resource::Raw));
680 fetcher->stopFetching(); 680 fetcher->stopFetching();
681 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); 681 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url);
682 682
683 EXPECT_NE(resource, newResource); 683 EXPECT_NE(resource, newResource);
684 } 684 }
685 685
686 } // namespace blink 686 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698