OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 #include "base/test/test_simple_task_runner.h" | 6 #include "base/test/test_simple_task_runner.h" |
7 #include "content/browser/streams/stream.h" | 7 #include "content/browser/streams/stream.h" |
8 #include "content/browser/streams/stream_read_observer.h" | 8 #include "content/browser/streams/stream_read_observer.h" |
9 #include "content/browser/streams/stream_registry.h" | 9 #include "content/browser/streams/stream_registry.h" |
10 #include "content/browser/streams/stream_write_observer.h" | 10 #include "content/browser/streams/stream_write_observer.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class StreamTest : public testing::Test { | 15 class StreamTest : public testing::Test { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 GURL url("blob://stream"); | 201 GURL url("blob://stream"); |
202 scoped_refptr<Stream> stream1( | 202 scoped_refptr<Stream> stream1( |
203 new Stream(registry_.get(), &writer, GURL(), url)); | 203 new Stream(registry_.get(), &writer, GURL(), url)); |
204 | 204 |
205 registry_->UnregisterStream(url); | 205 registry_->UnregisterStream(url); |
206 scoped_refptr<Stream> stream2 = registry_->GetStream(url); | 206 scoped_refptr<Stream> stream2 = registry_->GetStream(url); |
207 ASSERT_FALSE(stream2.get()); | 207 ASSERT_FALSE(stream2.get()); |
208 } | 208 } |
209 | 209 |
210 } // namespace content | 210 } // namespace content |
OLD | NEW |