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

Side by Side Diff: content/browser/byte_stream_unittest.cc

Issue 19532003: Use a direct include of the message_loop header in content/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « content/browser/browser_thread_unittest.cc ('k') | content/browser/device_monitor_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/byte_stream.h" 5 #include "content/browser/byte_stream.h"
6 6
7 #include <deque> 7 #include <deque>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/test/test_simple_task_runner.h" 13 #include "base/test/test_simple_task_runner.h"
14 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace content { 17 namespace content {
18 namespace { 18 namespace {
19 19
20 void CountCallbacks(int* counter) { 20 void CountCallbacks(int* counter) {
21 ++*counter; 21 ++*counter;
22 } 22 }
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 byte_stream_output->RegisterCallback( 498 byte_stream_output->RegisterCallback(
499 base::Bind(CountCallbacks, &num_callbacks)); 499 base::Bind(CountCallbacks, &num_callbacks));
500 500
501 // Immediately close the stream. 501 // Immediately close the stream.
502 byte_stream_input->Close(DOWNLOAD_INTERRUPT_REASON_NONE); 502 byte_stream_input->Close(DOWNLOAD_INTERRUPT_REASON_NONE);
503 task_runner->RunUntilIdle(); 503 task_runner->RunUntilIdle();
504 EXPECT_EQ(1, num_callbacks); 504 EXPECT_EQ(1, num_callbacks);
505 } 505 }
506 506
507 } // namespace content 507 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_thread_unittest.cc ('k') | content/browser/device_monitor_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698