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

Side by Side Diff: components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/data_reduction_proxy/content/browser/content_lofi_ui_servic e.h" 5 #include "components/data_reduction_proxy/content/browser/content_lofi_ui_servic e.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 26 matching lines...) Expand all
37 EXPECT_TRUE( 37 EXPECT_TRUE(
38 content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 38 content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
39 39
40 net::TestURLRequestContext context(true); 40 net::TestURLRequestContext context(true);
41 net::MockClientSocketFactory mock_socket_factory; 41 net::MockClientSocketFactory mock_socket_factory;
42 net::TestDelegate delegate; 42 net::TestDelegate delegate;
43 context.set_client_socket_factory(&mock_socket_factory); 43 context.set_client_socket_factory(&mock_socket_factory);
44 context.Init(); 44 context.Init();
45 45
46 content_lofi_ui_service_.reset(new ContentLoFiUIService( 46 content_lofi_ui_service_.reset(new ContentLoFiUIService(
47 content::BrowserThread::GetMessageLoopProxyForThread( 47 content::BrowserThread::GetTaskRunnerForThread(
48 content::BrowserThread::UI), 48 content::BrowserThread::UI),
49 base::Bind(&ContentLoFiUIServiceTest::OnLoFiResponseReceivedCallback, 49 base::Bind(&ContentLoFiUIServiceTest::OnLoFiResponseReceivedCallback,
50 base::Unretained(this)))); 50 base::Unretained(this))));
51 51
52 std::unique_ptr<net::URLRequest> request = 52 std::unique_ptr<net::URLRequest> request =
53 CreateRequest(context, &delegate); 53 CreateRequest(context, &delegate);
54 54
55 content_lofi_ui_service_->OnLoFiReponseReceived(*request, is_preview); 55 content_lofi_ui_service_->OnLoFiReponseReceived(*request, is_preview);
56 56
57 content::BrowserThread::PostTask( 57 content::BrowserThread::PostTask(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 content::BrowserThread::PostTask( 118 content::BrowserThread::PostTask(
119 content::BrowserThread::IO, FROM_HERE, 119 content::BrowserThread::IO, FROM_HERE,
120 base::Bind(&ContentLoFiUIServiceTest::RunTestOnIOThread, 120 base::Bind(&ContentLoFiUIServiceTest::RunTestOnIOThread,
121 base::Unretained(this), &ui_run_loop, true)); 121 base::Unretained(this), &ui_run_loop, true));
122 ui_run_loop.Run(); 122 ui_run_loop.Run();
123 base::RunLoop().RunUntilIdle(); 123 base::RunLoop().RunUntilIdle();
124 VerifyOnLoFiResponseReceivedCallback(true); 124 VerifyOnLoFiResponseReceivedCallback(true);
125 } 125 }
126 126
127 } // namespace data_reduction_proxy 127 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « chromecast/renderer/media/chromecast_media_renderer_factory.cc ('k') | components/drive/drive_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698