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

Side by Side Diff: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Cleanup, reponding to review comments Created 3 years, 8 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 WebFrameClient* client, 159 WebFrameClient* client,
160 WebWidgetClient* widgetClient, 160 WebWidgetClient* widgetClient,
161 WebFrame* previousSibling, 161 WebFrame* previousSibling,
162 const WebFrameOwnerProperties& properties) { 162 const WebFrameOwnerProperties& properties) {
163 if (!client) 163 if (!client)
164 client = defaultWebFrameClient(); 164 client = defaultWebFrameClient();
165 165
166 WebLocalFrameImpl* frame = toWebLocalFrameImpl(parent->createLocalChild( 166 WebLocalFrameImpl* frame = toWebLocalFrameImpl(parent->createLocalChild(
167 WebTreeScopeType::Document, name, WebSandboxFlags::None, client, 167 WebTreeScopeType::Document, name, WebSandboxFlags::None, client,
168 static_cast<TestWebFrameClient*>(client)->interfaceProvider(), nullptr, 168 static_cast<TestWebFrameClient*>(client)->interfaceProvider(), nullptr,
169 previousSibling, properties, nullptr)); 169 previousSibling, WebParsedFeaturePolicy(), properties, nullptr));
170 170
171 if (!widgetClient) 171 if (!widgetClient)
172 widgetClient = defaultWebWidgetClient(); 172 widgetClient = defaultWebWidgetClient();
173 WebFrameWidget::create(widgetClient, frame); 173 WebFrameWidget::create(widgetClient, frame);
174 174
175 return frame; 175 return frame;
176 } 176 }
177 177
178 WebRemoteFrameImpl* createRemoteChild(WebRemoteFrame* parent, 178 WebRemoteFrameImpl* createRemoteChild(WebRemoteFrame* parent,
179 WebRemoteFrameClient* client, 179 WebRemoteFrameClient* client,
180 const WebString& name) { 180 const WebString& name) {
181 return toWebRemoteFrameImpl( 181 return toWebRemoteFrameImpl(parent->createRemoteChild(
182 parent->createRemoteChild(WebTreeScopeType::Document, name, 182 WebTreeScopeType::Document, name, WebSandboxFlags::None,
183 WebSandboxFlags::None, client, nullptr)); 183 WebParsedFeaturePolicy(), client, nullptr));
184 } 184 }
185 185
186 WebViewHelper::WebViewHelper(SettingOverrider* settingOverrider) 186 WebViewHelper::WebViewHelper(SettingOverrider* settingOverrider)
187 : m_webView(nullptr), m_settingOverrider(settingOverrider) {} 187 : m_webView(nullptr), m_settingOverrider(settingOverrider) {}
188 188
189 WebViewHelper::~WebViewHelper() { 189 WebViewHelper::~WebViewHelper() {
190 reset(); 190 reset();
191 } 191 }
192 192
193 WebViewImpl* WebViewHelper::initializeWithOpener( 193 WebViewImpl* WebViewHelper::initializeWithOpener(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 frame->close(); 299 frame->close();
300 } 300 }
301 301
302 WebLocalFrame* TestWebFrameClient::createChildFrame( 302 WebLocalFrame* TestWebFrameClient::createChildFrame(
303 WebLocalFrame* parent, 303 WebLocalFrame* parent,
304 WebTreeScopeType scope, 304 WebTreeScopeType scope,
305 const WebString& name, 305 const WebString& name,
306 const WebString& fallbackName, 306 const WebString& fallbackName,
307 WebSandboxFlags sandboxFlags, 307 WebSandboxFlags sandboxFlags,
308 const WebParsedFeaturePolicy& containerPolicy,
308 const WebFrameOwnerProperties& frameOwnerProperties) { 309 const WebFrameOwnerProperties& frameOwnerProperties) {
309 WebLocalFrame* frame = 310 WebLocalFrame* frame =
310 WebLocalFrame::create(scope, this, interfaceProvider(), nullptr); 311 WebLocalFrame::create(scope, this, interfaceProvider(), nullptr);
311 parent->appendChild(frame); 312 parent->appendChild(frame);
312 return frame; 313 return frame;
313 } 314 }
314 315
315 void TestWebFrameClient::didStartLoading(bool) { 316 void TestWebFrameClient::didStartLoading(bool) {
316 ++m_loadsInProgress; 317 ++m_loadsInProgress;
317 } 318 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 m_testWebViewClient->scheduleAnimation(); 351 m_testWebViewClient->scheduleAnimation();
351 } 352 }
352 353
353 void TestWebViewWidgetClient::didMeaningfulLayout( 354 void TestWebViewWidgetClient::didMeaningfulLayout(
354 WebMeaningfulLayout layoutType) { 355 WebMeaningfulLayout layoutType) {
355 m_testWebViewClient->didMeaningfulLayout(layoutType); 356 m_testWebViewClient->didMeaningfulLayout(layoutType);
356 } 357 }
357 358
358 } // namespace FrameTestHelpers 359 } // namespace FrameTestHelpers
359 } // namespace blink 360 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698