| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 EXPECT_EQ(expectedURL.hasPort(), fetchRequest.resourceRequest().url().ha
sPort()); | 79 EXPECT_EQ(expectedURL.hasPort(), fetchRequest.resourceRequest().url().ha
sPort()); |
| 80 EXPECT_EQ(expectedURL.path(), fetchRequest.resourceRequest().url().path(
)); | 80 EXPECT_EQ(expectedURL.path(), fetchRequest.resourceRequest().url().path(
)); |
| 81 } | 81 } |
| 82 | 82 |
| 83 KURL secureURL; | 83 KURL secureURL; |
| 84 RefPtr<SecurityOrigin> secureOrigin; | 84 RefPtr<SecurityOrigin> secureOrigin; |
| 85 | 85 |
| 86 // We don't use the DocumentLoader directly in any tests, but need to keep i
t around as long | 86 // We don't use the DocumentLoader directly in any tests, but need to keep i
t around as long |
| 87 // as the ResourceFetcher and Document live due to indirect usage. | 87 // as the ResourceFetcher and Document live due to indirect usage. |
| 88 RefPtr<DocumentLoader> documentLoader; | 88 RefPtr<DocumentLoader> documentLoader; |
| 89 RefPtrWillBeRawPtr<ResourceFetcher> fetcher; | 89 RefPtrWillBePersistent<ResourceFetcher> fetcher; |
| 90 RefPtrWillBePersistent<Document> document; | 90 RefPtrWillBePersistent<Document> document; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach) | 93 TEST_F(ResourceFetcherTest, StartLoadAfterFrameDetach) |
| 94 { | 94 { |
| 95 EXPECT_EQ(fetcher->frame(), static_cast<LocalFrame*>(0)); | 95 EXPECT_EQ(fetcher->frame(), static_cast<LocalFrame*>(0)); |
| 96 | 96 |
| 97 // Try to request a url. The request should fail, no resource should be retu
rned, | 97 // Try to request a url. The request should fail, no resource should be retu
rned, |
| 98 // and no resource should be present in the cache. | 98 // and no resource should be present in the cache. |
| 99 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn
itiatorInfo()); | 99 FetchRequest fetchRequest = FetchRequest(ResourceRequest(secureURL), FetchIn
itiatorInfo()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 expectUpgrade("https://example.test/image.png", "https://example.test/image.
png"); | 150 expectUpgrade("https://example.test/image.png", "https://example.test/image.
png"); |
| 151 expectUpgrade("https://example.test:80/image.png", "https://example.test:80/
image.png"); | 151 expectUpgrade("https://example.test:80/image.png", "https://example.test:80/
image.png"); |
| 152 expectUpgrade("https://example.test:1212/image.png", "https://example.test:1
212/image.png"); | 152 expectUpgrade("https://example.test:1212/image.png", "https://example.test:1
212/image.png"); |
| 153 | 153 |
| 154 expectUpgrade("ftp://example.test/image.png", "ftp://example.test/image.png"
); | 154 expectUpgrade("ftp://example.test/image.png", "ftp://example.test/image.png"
); |
| 155 expectUpgrade("ftp://example.test:21/image.png", "ftp://example.test:21/imag
e.png"); | 155 expectUpgrade("ftp://example.test:21/image.png", "ftp://example.test:21/imag
e.png"); |
| 156 expectUpgrade("ftp://example.test:1212/image.png", "ftp://example.test:1212/
image.png"); | 156 expectUpgrade("ftp://example.test:1212/image.png", "ftp://example.test:1212/
image.png"); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace | 159 } // namespace |
| OLD | NEW |