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

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

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/tests/FrameLoaderClientImplTest.cpp ('k') | Source/web/tests/ImeOnFocusTest.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // 6. When ServeAsyncRequestsTask notices there are no more loads in progress, 64 // 6. When ServeAsyncRequestsTask notices there are no more loads in progress,
65 // it exits the run loop. 65 // it exits the run loop.
66 // 7. At this point, all parsing, resource loads, and layout should be finished. 66 // 7. At this point, all parsing, resource loads, and layout should be finished.
67 TestWebFrameClient* testClientForFrame(WebFrame* frame) 67 TestWebFrameClient* testClientForFrame(WebFrame* frame)
68 { 68 {
69 return static_cast<TestWebFrameClient*>(toWebLocalFrameImpl(frame)->client() ); 69 return static_cast<TestWebFrameClient*>(toWebLocalFrameImpl(frame)->client() );
70 } 70 }
71 71
72 class QuitTask : public WebThread::Task { 72 class QuitTask : public WebThread::Task {
73 public: 73 public:
74 void PostThis(WebCore::Timer<QuitTask>*) 74 void PostThis(blink::Timer<QuitTask>*)
75 { 75 {
76 // We don't just quit here because the SharedTimer may be part-way 76 // We don't just quit here because the SharedTimer may be part-way
77 // through the current queue of tasks when runPendingTasks was called, 77 // through the current queue of tasks when runPendingTasks was called,
78 // and we can't miss the tasks that were behind it. 78 // and we can't miss the tasks that were behind it.
79 // Takes ownership of |this|. 79 // Takes ownership of |this|.
80 Platform::current()->currentThread()->postTask(this); 80 Platform::current()->currentThread()->postTask(this);
81 } 81 }
82 82
83 virtual void run() 83 virtual void run()
84 { 84 {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 void pumpPendingRequestsDoNotUse(WebFrame* frame) 241 void pumpPendingRequestsDoNotUse(WebFrame* frame)
242 { 242 {
243 pumpPendingRequests(frame); 243 pumpPendingRequests(frame);
244 } 244 }
245 245
246 // FIXME: There's a duplicate implementation in UnitTestHelpers.cpp. Remove one. 246 // FIXME: There's a duplicate implementation in UnitTestHelpers.cpp. Remove one.
247 void runPendingTasks() 247 void runPendingTasks()
248 { 248 {
249 // Pending tasks include Timers that have been scheduled. 249 // Pending tasks include Timers that have been scheduled.
250 WebCore::Timer<QuitTask> quitOnTimeout(new QuitTask, &QuitTask::PostThis); 250 blink::Timer<QuitTask> quitOnTimeout(new QuitTask, &QuitTask::PostThis);
251 quitOnTimeout.startOneShot(0, FROM_HERE); 251 quitOnTimeout.startOneShot(0, FROM_HERE);
252 Platform::current()->currentThread()->enterRunLoop(); 252 Platform::current()->currentThread()->enterRunLoop();
253 } 253 }
254 254
255 WebViewHelper::WebViewHelper() 255 WebViewHelper::WebViewHelper()
256 : m_webView(0) 256 : m_webView(0)
257 { 257 {
258 } 258 }
259 259
260 WebViewHelper::~WebViewHelper() 260 WebViewHelper::~WebViewHelper()
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 331
332 void TestWebViewClient::initializeLayerTreeView() 332 void TestWebViewClient::initializeLayerTreeView()
333 { 333 {
334 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 334 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
335 ASSERT(m_layerTreeView); 335 ASSERT(m_layerTreeView);
336 } 336 }
337 337
338 } // namespace FrameTestHelpers 338 } // namespace FrameTestHelpers
339 } // namespace blink 339 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/tests/FrameLoaderClientImplTest.cpp ('k') | Source/web/tests/ImeOnFocusTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698