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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceTest.cpp

Issue 2410753002: Remove ResourceTest.ProhibitAddRemoveClientInScope unit test (Closed)
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MockResourceClients.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
index 2bbbc601d7c39c3867e0b1cce125ef4d5dbf59fa..e55a87fd2bed0360124e9dd3d0fff2e6cfa97dad 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
@@ -5,7 +5,6 @@
#include "core/fetch/Resource.h"
#include "core/fetch/MemoryCache.h"
-#include "core/fetch/MockResourceClients.h"
#include "core/fetch/RawResource.h"
#include "platform/SharedBuffer.h"
#include "platform/network/ResourceRequest.h"
@@ -53,25 +52,6 @@ void createTestResourceAndSetCachedMetadata(const ResourceResponse& response) {
return;
}
-class TestProhibitAddRemoveClientResource final : public Resource {
- public:
- static TestProhibitAddRemoveClientResource* create() {
- return new TestProhibitAddRemoveClientResource();
- }
- void testAddClient(ResourceClient* client) {
- ProhibitAddRemoveClientInScope prohibitAddRemoveClient(this);
- addClient(client);
- }
- void testRemoveClient(ResourceClient* client) {
- ProhibitAddRemoveClientInScope prohibitAddRemoveClient(this);
- removeClient(client);
- }
-
- private:
- TestProhibitAddRemoveClientResource()
- : Resource(ResourceRequest(), Resource::Raw, ResourceLoaderOptions()) {}
-};
-
} // anonymous namespace
TEST(ResourceTest, SetCachedMetadata_SendsMetadataToPlatform) {
@@ -110,15 +90,4 @@ TEST(ResourceTest, RevalidateWithFragment) {
resource->responseReceived(revalidatingResponse, nullptr);
}
-TEST(ResourceTest, ProhibitAddRemoveClientInScope) {
- TestProhibitAddRemoveClientResource* resource =
- TestProhibitAddRemoveClientResource::create();
- Persistent<MockResourceClient> client = new MockResourceClient();
- EXPECT_DEATH(resource->testAddClient(client),
- "!m_isAddRemoveClientProhibited");
- resource->addClient(client);
- EXPECT_DEATH(resource->testRemoveClient(client),
- "!m_isAddRemoveClientProhibited");
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MockResourceClients.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698