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

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

Issue 2505543002: Move FrameView timers to WebFrameScheduler. (Closed)
Patch Set: Created 4 years, 1 month 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 childDocumentLoader->detachFromFrame(); 102 childDocumentLoader->detachFromFrame();
103 childDocumentLoader.clear(); 103 childDocumentLoader.clear();
104 childFrame->detach(FrameDetachType::Remove); 104 childFrame->detach(FrameDetachType::Remove);
105 } 105 }
106 } 106 }
107 107
108 FrameFetchContext* createChildFrame() { 108 FrameFetchContext* createChildFrame() {
109 childClient = StubFrameLoaderClientWithParent::create(document->frame()); 109 childClient = StubFrameLoaderClientWithParent::create(document->frame());
110 childFrame = LocalFrame::create(childClient.get(), 110 childFrame = LocalFrame::create(childClient.get(),
111 document->frame()->host(), owner.get()); 111 document->frame()->host(), owner.get());
112 childFrame->setView(FrameView::create(childFrame.get(), IntSize(500, 500))); 112 childFrame->setView(FrameView::create(*childFrame, IntSize(500, 500)));
113 childFrame->init(); 113 childFrame->init();
114 childDocumentLoader = DocumentLoader::create( 114 childDocumentLoader = DocumentLoader::create(
115 childFrame.get(), ResourceRequest("http://www.example.com"), 115 childFrame.get(), ResourceRequest("http://www.example.com"),
116 SubstituteData(), ClientRedirectPolicy::NotClientRedirect); 116 SubstituteData(), ClientRedirectPolicy::NotClientRedirect);
117 childDocument = childFrame->document(); 117 childDocument = childFrame->document();
118 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>( 118 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>(
119 &childDocumentLoader->fetcher()->context()); 119 &childDocumentLoader->fetcher()->context());
120 FrameFetchContext::provideDocumentToContext(*childFetchContext, 120 FrameFetchContext::provideDocumentToContext(*childFetchContext,
121 childDocument.get()); 121 childDocument.get());
122 return childFetchContext; 122 return childFetchContext;
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 fetchContext->addAdditionalRequestHeaders(mainRequest, FetchMainResource); 804 fetchContext->addAdditionalRequestHeaders(mainRequest, FetchMainResource);
805 EXPECT_EQ(test.isExternalExpectation, mainRequest.isExternalRequest()); 805 EXPECT_EQ(test.isExternalExpectation, mainRequest.isExternalRequest());
806 806
807 ResourceRequest subRequest(test.url); 807 ResourceRequest subRequest(test.url);
808 fetchContext->addAdditionalRequestHeaders(subRequest, FetchSubresource); 808 fetchContext->addAdditionalRequestHeaders(subRequest, FetchSubresource);
809 EXPECT_EQ(test.isExternalExpectation, subRequest.isExternalRequest()); 809 EXPECT_EQ(test.isExternalExpectation, subRequest.isExternalRequest());
810 } 810 }
811 } 811 }
812 812
813 } // namespace blink 813 } // 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