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

Side by Side Diff: third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp

Issue 2107163003: Remove calls to deprecated MessageLoop methods in third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/chrome_address_validator.cc » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "platform/testing/UnitTestHelpers.h" 26 #include "platform/testing/UnitTestHelpers.h"
27 27
28 #include "base/files/file_path.h" 28 #include "base/files/file_path.h"
29 #include "base/files/file_util.h" 29 #include "base/files/file_util.h"
30 #include "base/message_loop/message_loop.h" 30 #include "base/message_loop/message_loop.h"
31 #include "base/path_service.h" 31 #include "base/path_service.h"
32 #include "base/run_loop.h"
32 #include "platform/SharedBuffer.h" 33 #include "platform/SharedBuffer.h"
33 #include "platform/Timer.h" 34 #include "platform/Timer.h"
34 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
35 #include "public/platform/FilePathConversion.h" 36 #include "public/platform/FilePathConversion.h"
36 #include "public/platform/Platform.h" 37 #include "public/platform/Platform.h"
37 #include "public/platform/WebString.h" 38 #include "public/platform/WebString.h"
38 #include "public/platform/WebTaskRunner.h" 39 #include "public/platform/WebTaskRunner.h"
39 #include "public/platform/WebThread.h" 40 #include "public/platform/WebThread.h"
40 #include "public/platform/WebTraceLocation.h" 41 #include "public/platform/WebTraceLocation.h"
41 #include "wtf/text/StringUTF8Adaptor.h" 42 #include "wtf/text/StringUTF8Adaptor.h"
(...skipping 30 matching lines...) Expand all
72 PassRefPtr<SharedBuffer> readFromFile(const String& path) 73 PassRefPtr<SharedBuffer> readFromFile(const String& path)
73 { 74 {
74 base::FilePath filePath = blink::WebStringToFilePath(path); 75 base::FilePath filePath = blink::WebStringToFilePath(path);
75 std::string buffer; 76 std::string buffer;
76 base::ReadFileToString(filePath, &buffer); 77 base::ReadFileToString(filePath, &buffer);
77 return SharedBuffer::create(buffer.data(), buffer.size()); 78 return SharedBuffer::create(buffer.data(), buffer.size());
78 } 79 }
79 80
80 void enterRunLoop() 81 void enterRunLoop()
81 { 82 {
82 base::MessageLoop::current()->Run(); 83 base::RunLoop().Run();
83 } 84 }
84 85
85 void exitRunLoop() 86 void exitRunLoop()
86 { 87 {
87 base::MessageLoop::current()->QuitWhenIdle(); 88 base::MessageLoop::current()->QuitWhenIdle();
88 } 89 }
89 90
90 void yieldCurrentThread() 91 void yieldCurrentThread()
91 { 92 {
92 base::PlatformThread::YieldCurrentThread(); 93 base::PlatformThread::YieldCurrentThread();
93 } 94 }
94 95
95 } // namespace testing 96 } // namespace testing
96 } // namespace blink 97 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/chrome_address_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698