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

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

Issue 1124153003: [Oilpan] [Reland] Migrate classes under core/fetch to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work for comment Created 5 years, 5 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 { 55 {
56 return new Resource(request, Resource::Image); 56 return new Resource(request, Resource::Image);
57 } 57 }
58 }; 58 };
59 59
60 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach) 60 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach)
61 { 61 {
62 KURL secureURL(ParsedURLString, "https://secureorigin.test/image.png"); 62 KURL secureURL(ParsedURLString, "https://secureorigin.test/image.png");
63 // Try to request a url. The request should fail, no resource should be retu rned, 63 // Try to request a url. The request should fail, no resource should be retu rned,
64 // and no resource should be present in the cache. 64 // and no resource should be present in the cache.
65 RefPtrWillBeRawPtr<ResourceFetcher> fetcher = ResourceFetcher::create(nullpt r); 65 ResourceFetcher* fetcher = ResourceFetcher::create(nullptr);
66 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn itiatorInfo()); 66 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn itiatorInfo());
67 ResourcePtr<Resource> resource = fetcher->requestResource(fetchRequest, Test ResourceFactory()); 67 ResourcePtr<Resource> resource = fetcher->requestResource(fetchRequest, Test ResourceFactory());
68 EXPECT_EQ(resource.get(), static_cast<Resource*>(nullptr)); 68 EXPECT_EQ(resource.get(), static_cast<Resource*>(nullptr));
69 EXPECT_EQ(memoryCache()->resourceForURL(secureURL), static_cast<Resource*>(n ullptr)); 69 EXPECT_EQ(memoryCache()->resourceForURL(secureURL), static_cast<Resource*>(n ullptr));
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698