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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 | 120 |
121 void TearDown() override { | 121 void TearDown() override { |
122 if (childFrame) | 122 if (childFrame) |
123 childFrame->detach(FrameDetachType::Remove); | 123 childFrame->detach(FrameDetachType::Remove); |
124 } | 124 } |
125 | 125 |
126 FrameFetchContext* createChildFrame() { | 126 FrameFetchContext* createChildFrame() { |
127 childClient = StubLocalFrameClientWithParent::create(document->frame()); | 127 childClient = StubLocalFrameClientWithParent::create(document->frame()); |
128 childFrame = LocalFrame::create(childClient.get(), | 128 childFrame = LocalFrame::create(childClient.get(), |
129 document->frame()->page(), owner.get()); | 129 *document->frame()->page(), owner.get()); |
130 childFrame->setView(FrameView::create(*childFrame, IntSize(500, 500))); | 130 childFrame->setView(FrameView::create(*childFrame, IntSize(500, 500))); |
131 childFrame->init(); | 131 childFrame->init(); |
132 childDocument = childFrame->document(); | 132 childDocument = childFrame->document(); |
133 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>( | 133 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>( |
134 &childFrame->loader().documentLoader()->fetcher()->context()); | 134 &childFrame->loader().documentLoader()->fetcher()->context()); |
135 FrameFetchContext::provideDocumentToContext(*childFetchContext, | 135 FrameFetchContext::provideDocumentToContext(*childFetchContext, |
136 childDocument.get()); | 136 childDocument.get()); |
137 return childFetchContext; | 137 return childFetchContext; |
138 } | 138 } |
139 | 139 |
(...skipping 766 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 |