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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp

Issue 2955573003: Set frame policy correctly in newly created renderer proxies (Closed)
Patch Set: Fix container policy replication bug in provisional frames Created 3 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 client->Bind(frame, std::move(self_owned)); 168 client->Bind(frame, std::move(self_owned));
169 return frame; 169 return frame;
170 } 170 }
171 171
172 WebLocalFrameBase* CreateProvisional(WebRemoteFrame& old_frame, 172 WebLocalFrameBase* CreateProvisional(WebRemoteFrame& old_frame,
173 TestWebFrameClient* client) { 173 TestWebFrameClient* client) {
174 auto owned_client = CreateDefaultClientIfNeeded(client); 174 auto owned_client = CreateDefaultClientIfNeeded(client);
175 WebLocalFrameBase* frame = 175 WebLocalFrameBase* frame =
176 ToWebLocalFrameBase(WebLocalFrame::CreateProvisional( 176 ToWebLocalFrameBase(WebLocalFrame::CreateProvisional(
177 client, client->GetInterfaceProviderForTesting(), nullptr, &old_frame, 177 client, client->GetInterfaceProviderForTesting(), nullptr, &old_frame,
178 WebSandboxFlags::kNone)); 178 WebSandboxFlags::kNone, WebParsedFeaturePolicy()));
179 client->Bind(frame, std::move(owned_client)); 179 client->Bind(frame, std::move(owned_client));
180 // Create a local root, if necessary. 180 // Create a local root, if necessary.
181 std::unique_ptr<TestWebWidgetClient> owned_widget_client; 181 std::unique_ptr<TestWebWidgetClient> owned_widget_client;
182 if (!frame->Parent()) { 182 if (!frame->Parent()) {
183 // TODO(dcheng): The main frame widget currently has a special case. 183 // TODO(dcheng): The main frame widget currently has a special case.
184 // Eliminate this once WebView is no longer a WebWidget. 184 // Eliminate this once WebView is no longer a WebWidget.
185 owned_widget_client = WTF::MakeUnique<TestWebViewWidgetClient>( 185 owned_widget_client = WTF::MakeUnique<TestWebViewWidgetClient>(
186 *static_cast<TestWebViewClient*>(frame->ViewImpl()->Client())); 186 *static_cast<TestWebViewClient*>(frame->ViewImpl()->Client()));
187 } else if (frame->Parent()->IsWebRemoteFrame()) { 187 } else if (frame->Parent()->IsWebRemoteFrame()) {
188 owned_widget_client = WTF::MakeUnique<TestWebWidgetClient>(); 188 owned_widget_client = WTF::MakeUnique<TestWebWidgetClient>();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 test_web_view_client_.ScheduleAnimation(); 445 test_web_view_client_.ScheduleAnimation();
446 } 446 }
447 447
448 void TestWebViewWidgetClient::DidMeaningfulLayout( 448 void TestWebViewWidgetClient::DidMeaningfulLayout(
449 WebMeaningfulLayout layout_type) { 449 WebMeaningfulLayout layout_type) {
450 test_web_view_client_.DidMeaningfulLayout(layout_type); 450 test_web_view_client_.DidMeaningfulLayout(layout_type);
451 } 451 }
452 452
453 } // namespace FrameTestHelpers 453 } // namespace FrameTestHelpers
454 } // namespace blink 454 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/site-per-process ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698