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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp

Issue 2762423003: Made Frame constructors (and subclasses) take Page& instead of Page* (Closed)
Patch Set: Rebase Created 3 years, 9 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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698