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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh Created 7 years, 6 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 MakeTestRequest(second_filter.get(), 0, kMaxRequestsPerProcess + 2, 1402 MakeTestRequest(second_filter.get(), 0, kMaxRequestsPerProcess + 2,
1403 net::URLRequestTestJob::test_url_2()); 1403 net::URLRequestTestJob::test_url_2());
1404 1404
1405 // Issue a request for the third process -- this should fail, because the 1405 // Issue a request for the third process -- this should fail, because the
1406 // global limit has been reached. 1406 // global limit has been reached.
1407 MakeTestRequest(third_filter.get(), 0, kMaxRequestsPerProcess + 3, 1407 MakeTestRequest(third_filter.get(), 0, kMaxRequestsPerProcess + 3,
1408 net::URLRequestTestJob::test_url_2()); 1408 net::URLRequestTestJob::test_url_2());
1409 1409
1410 // Flush all the pending requests. 1410 // Flush all the pending requests.
1411 while (net::URLRequestTestJob::ProcessOnePendingMessage()) {} 1411 while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
1412 MessageLoop::current()->RunUntilIdle(); 1412 base::MessageLoop::current()->RunUntilIdle();
1413 1413
1414 // Sorts out all the messages we saw by request. 1414 // Sorts out all the messages we saw by request.
1415 ResourceIPCAccumulator::ClassifiedMessages msgs; 1415 ResourceIPCAccumulator::ClassifiedMessages msgs;
1416 accum_.GetClassifiedMessages(&msgs); 1416 accum_.GetClassifiedMessages(&msgs);
1417 1417
1418 // The processes issued the following requests: 1418 // The processes issued the following requests:
1419 // #1 issued kMaxRequestsPerProcess that passed + 1 that failed 1419 // #1 issued kMaxRequestsPerProcess that passed + 1 that failed
1420 // #2 issued 1 request that passed 1420 // #2 issued 1 request that passed
1421 // #3 issued 1 request that failed 1421 // #3 issued 1 request that failed
1422 ASSERT_EQ((kMaxRequestsPerProcess + 1) + 1 + 1, msgs.size()); 1422 ASSERT_EQ((kMaxRequestsPerProcess + 1) + 1 + 1, msgs.size());
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 } 1938 }
1939 1939
1940 base::MessageLoop::current()->RunUntilIdle(); 1940 base::MessageLoop::current()->RunUntilIdle();
1941 1941
1942 msgs.clear(); 1942 msgs.clear();
1943 accum_.GetClassifiedMessages(&msgs); 1943 accum_.GetClassifiedMessages(&msgs);
1944 } 1944 }
1945 } 1945 }
1946 1946
1947 } // namespace content 1947 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698