Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015, Google Inc. All rights reserved. | 2 * Copyright (c) 2015, 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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 584 | 584 |
| 585 // Set up a child frame | 585 // Set up a child frame |
| 586 FrameFetchContext* childFetchContext = createChildFrame(); | 586 FrameFetchContext* childFetchContext = createChildFrame(); |
| 587 | 587 |
| 588 // Child frame as part of back/forward | 588 // Child frame as part of back/forward |
| 589 document->loader()->setLoadType(FrameLoadTypeBackForward); | 589 document->loader()->setLoadType(FrameLoadTypeBackForward); |
| 590 EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, | 590 EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, |
| 591 childFetchContext->resourceRequestCachePolicy( | 591 childFetchContext->resourceRequestCachePolicy( |
| 592 request, Resource::MainResource, FetchRequest::NoDefer)); | 592 request, Resource::MainResource, FetchRequest::NoDefer)); |
| 593 | 593 |
| 594 // Child frame as part of reload | 594 // Child frame as part of reload |
|
Takashi Toyoshima
2017/03/23 08:45:42
Non-mechanical changes, but want to test the new b
| |
| 595 document->loader()->setLoadType(FrameLoadTypeReload); | 595 document->loader()->setLoadType(FrameLoadTypeReloadMainResource); |
| 596 EXPECT_EQ(WebCachePolicy::ValidatingCacheData, | 596 EXPECT_EQ(WebCachePolicy::UseProtocolCachePolicy, |
| 597 childFetchContext->resourceRequestCachePolicy( | 597 childFetchContext->resourceRequestCachePolicy( |
| 598 request, Resource::MainResource, FetchRequest::NoDefer)); | 598 request, Resource::MainResource, FetchRequest::NoDefer)); |
| 599 | 599 |
| 600 // Child frame as part of reload bypassing cache | 600 // Child frame as part of reload bypassing cache |
| 601 document->loader()->setLoadType(FrameLoadTypeReloadBypassingCache); | 601 document->loader()->setLoadType(FrameLoadTypeReloadBypassingCache); |
| 602 EXPECT_EQ(WebCachePolicy::BypassingCache, | 602 EXPECT_EQ(WebCachePolicy::BypassingCache, |
| 603 childFetchContext->resourceRequestCachePolicy( | 603 childFetchContext->resourceRequestCachePolicy( |
| 604 request, Resource::MainResource, FetchRequest::NoDefer)); | 604 request, Resource::MainResource, FetchRequest::NoDefer)); |
| 605 } | 605 } |
| 606 | 606 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 906 setFilterPolicy(WebDocumentSubresourceFilter::WouldDisallow); | 906 setFilterPolicy(WebDocumentSubresourceFilter::WouldDisallow); |
| 907 | 907 |
| 908 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequest()); | 908 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequest()); |
| 909 EXPECT_EQ(0, getFilteredLoadCallCount()); | 909 EXPECT_EQ(0, getFilteredLoadCallCount()); |
| 910 | 910 |
| 911 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequestPreload()); | 911 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequestPreload()); |
| 912 EXPECT_EQ(0, getFilteredLoadCallCount()); | 912 EXPECT_EQ(0, getFilteredLoadCallCount()); |
| 913 } | 913 } |
| 914 | 914 |
| 915 } // namespace blink | 915 } // namespace blink |
| OLD | NEW |