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

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

Issue 1141553006: Update Blink to use the tree scope info on WebFrame for scoping checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 7 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 | Annotate | Revision Log
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame (m_webView->mainFrame())->isLoading()); 275 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame (m_webView->mainFrame())->isLoading());
276 m_webView->close(); 276 m_webView->close();
277 m_webView = 0; 277 m_webView = 0;
278 } 278 }
279 } 279 }
280 280
281 TestWebFrameClient::TestWebFrameClient() : m_loadsInProgress(0) 281 TestWebFrameClient::TestWebFrameClient() : m_loadsInProgress(0)
282 { 282 {
283 } 283 }
284 284
285 WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, const WebS tring& frameName, WebSandboxFlags sandboxFlags) 285 WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTreeSco peType scope, const WebString& frameName, WebSandboxFlags sandboxFlags)
286 { 286 {
287 WebFrame* frame = WebLocalFrame::create(this); 287 WebFrame* frame = WebLocalFrame::create(scope, this);
288 parent->appendChild(frame); 288 parent->appendChild(frame);
289 return frame; 289 return frame;
290 } 290 }
291 291
292 void TestWebFrameClient::frameDetached(WebFrame* frame) 292 void TestWebFrameClient::frameDetached(WebFrame* frame)
293 { 293 {
294 if (frame->parent()) 294 if (frame->parent())
295 frame->parent()->removeChild(frame); 295 frame->parent()->removeChild(frame);
296 frame->close(); 296 frame->close();
297 } 297 }
(...skipping 18 matching lines...) Expand all
316 // and asynchronous parsing make use of off main thread HTML parser. 316 // and asynchronous parsing make use of off main thread HTML parser.
317 testing::runPendingTasks(); 317 testing::runPendingTasks();
318 if (!isLoading()) 318 if (!isLoading())
319 break; 319 break;
320 320
321 Platform::current()->yieldCurrentThread(); 321 Platform::current()->yieldCurrentThread();
322 } 322 }
323 } 323 }
324 324
325 TestWebRemoteFrameClient::TestWebRemoteFrameClient() 325 TestWebRemoteFrameClient::TestWebRemoteFrameClient()
326 : m_frame(WebRemoteFrame::create(this)) 326 : m_frame(WebRemoteFrame::create(WebTreeScopeType::Document, this))
327 { 327 {
328 } 328 }
329 329
330 void TestWebRemoteFrameClient::frameDetached() 330 void TestWebRemoteFrameClient::frameDetached()
331 { 331 {
332 if (m_frame->parent()) 332 if (m_frame->parent())
333 m_frame->parent()->removeChild(m_frame); 333 m_frame->parent()->removeChild(m_frame);
334 m_frame->close(); 334 m_frame->close();
335 } 335 }
336 336
337 void TestWebViewClient::initializeLayerTreeView() 337 void TestWebViewClient::initializeLayerTreeView()
338 { 338 {
339 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 339 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
340 ASSERT(m_layerTreeView); 340 ASSERT(m_layerTreeView);
341 } 341 }
342 342
343 } // namespace FrameTestHelpers 343 } // namespace FrameTestHelpers
344 } // namespace blink 344 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698