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

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

Issue 1063913002: Revert of Remove ResourceFetcher's access to a real FetchContext at frame detach time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace blink { 44 namespace blink {
45 45
46 class ResourceFetcherTest : public ::testing::Test { 46 class ResourceFetcherTest : public ::testing::Test {
47 }; 47 };
48 48
49 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach) 49 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach)
50 { 50 {
51 KURL secureURL(ParsedURLString, "https://secureorigin.test/image.png"); 51 KURL secureURL(ParsedURLString, "https://secureorigin.test/image.png");
52 // Try to request a url. The request should fail, no resource should be retu rned, 52 // Try to request a url. The request should fail, no resource should be retu rned,
53 // and no resource should be present in the cache. 53 // and no resource should be present in the cache.
54 RefPtrWillBeRawPtr<ResourceFetcher> fetcher = ResourceFetcher::create(nullpt r); 54 RefPtrWillBeRawPtr<ResourceFetcher> fetcher = ResourceFetcher::create(FetchC ontext::create());
55 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn itiatorInfo()); 55 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn itiatorInfo());
56 ResourcePtr<ImageResource> image = fetcher->fetchImage(fetchRequest); 56 ResourcePtr<ImageResource> image = fetcher->fetchImage(fetchRequest);
57 EXPECT_EQ(image.get(), static_cast<ImageResource*>(0)); 57 EXPECT_EQ(image.get(), static_cast<ImageResource*>(0));
58 EXPECT_EQ(memoryCache()->resourceForURL(secureURL), static_cast<Resource*>(0 )); 58 EXPECT_EQ(memoryCache()->resourceForURL(secureURL), static_cast<Resource*>(0 ));
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698