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

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

Issue 1052993006: Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor test cleanup Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/PinchViewportTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 33
34 #include "platform/testing/URLTestHelpers.h" 34 #include "platform/testing/URLTestHelpers.h"
35 #include "platform/testing/UnitTestHelpers.h" 35 #include "platform/testing/UnitTestHelpers.h"
36 #include "public/platform/Platform.h" 36 #include "public/platform/Platform.h"
37 #include "public/platform/WebData.h" 37 #include "public/platform/WebData.h"
38 #include "public/platform/WebString.h" 38 #include "public/platform/WebString.h"
39 #include "public/platform/WebThread.h" 39 #include "public/platform/WebThread.h"
40 #include "public/platform/WebURLRequest.h" 40 #include "public/platform/WebURLRequest.h"
41 #include "public/platform/WebURLResponse.h" 41 #include "public/platform/WebURLResponse.h"
42 #include "public/platform/WebUnitTestSupport.h" 42 #include "public/platform/WebUnitTestSupport.h"
43 #include "public/web/WebRemoteFrame.h"
43 #include "public/web/WebSettings.h" 44 #include "public/web/WebSettings.h"
44 #include "public/web/WebViewClient.h" 45 #include "public/web/WebViewClient.h"
45 #include "web/WebLocalFrameImpl.h" 46 #include "web/WebLocalFrameImpl.h"
46 #include "wtf/StdLibExtras.h" 47 #include "wtf/StdLibExtras.h"
47 48
48 namespace blink { 49 namespace blink {
49 namespace FrameTestHelpers { 50 namespace FrameTestHelpers {
50 51
51 namespace { 52 namespace {
52 53
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // runPendingTasks only ensures that main thread task queue is empty, 314 // runPendingTasks only ensures that main thread task queue is empty,
314 // and asynchronous parsing make use of off main thread HTML parser. 315 // and asynchronous parsing make use of off main thread HTML parser.
315 testing::runPendingTasks(); 316 testing::runPendingTasks();
316 if (!isLoading()) 317 if (!isLoading())
317 break; 318 break;
318 319
319 Platform::current()->yieldCurrentThread(); 320 Platform::current()->yieldCurrentThread();
320 } 321 }
321 } 322 }
322 323
324 TestWebRemoteFrameClient::TestWebRemoteFrameClient()
325 : m_frame(WebRemoteFrame::create(this))
326 {
327 }
328
329 void TestWebRemoteFrameClient::frameDetached()
330 {
331 if (m_frame->parent())
332 m_frame->parent()->removeChild(m_frame);
333 m_frame->close();
334 }
335
323 void TestWebViewClient::initializeLayerTreeView() 336 void TestWebViewClient::initializeLayerTreeView()
324 { 337 {
325 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 338 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
326 ASSERT(m_layerTreeView); 339 ASSERT(m_layerTreeView);
327 } 340 }
328 341
329 } // namespace FrameTestHelpers 342 } // namespace FrameTestHelpers
330 } // namespace blink 343 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/PinchViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698