| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 static const char kHttpUrl[] = "http://localhost/foo.webm"; | 220 static const char kHttpUrl[] = "http://localhost/foo.webm"; |
| 221 static const char kFileUrl[] = "file:///tmp/bar.webm"; | 221 static const char kFileUrl[] = "file:///tmp/bar.webm"; |
| 222 static const char kHttpDifferentPathUrl[] = "http://localhost/bar.webm"; | 222 static const char kHttpDifferentPathUrl[] = "http://localhost/bar.webm"; |
| 223 static const char kHttpDifferentOriginUrl[] = "http://127.0.0.1/foo.webm"; | 223 static const char kHttpDifferentOriginUrl[] = "http://127.0.0.1/foo.webm"; |
| 224 | 224 |
| 225 class MultibufferDataSourceTest : public testing::Test { | 225 class MultibufferDataSourceTest : public testing::Test { |
| 226 public: | 226 public: |
| 227 MultibufferDataSourceTest() | 227 MultibufferDataSourceTest() |
| 228 : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)), | 228 : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)), |
| 229 preload_(MultibufferDataSource::AUTO) { | 229 preload_(MultibufferDataSource::AUTO) { |
| 230 WebLocalFrame* frame = | 230 WebLocalFrame* frame = WebLocalFrame::create( |
| 231 WebLocalFrame::create(blink::WebTreeScopeType::Document, &client_); | 231 blink::WebTreeScopeType::Document, &client_, nullptr, nullptr); |
| 232 view_->setMainFrame(frame); | 232 view_->setMainFrame(frame); |
| 233 url_index_ = make_linked_ptr(new TestUrlIndex(frame)); | 233 url_index_ = make_linked_ptr(new TestUrlIndex(frame)); |
| 234 } | 234 } |
| 235 | 235 |
| 236 virtual ~MultibufferDataSourceTest() { | 236 virtual ~MultibufferDataSourceTest() { |
| 237 view_->close(); | 237 view_->close(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 MOCK_METHOD1(OnInitialize, void(bool)); | 240 MOCK_METHOD1(OnInitialize, void(bool)); |
| 241 | 241 |
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 base::Bind(&MultibufferDataSourceTest::ReadCallback, | 1632 base::Bind(&MultibufferDataSourceTest::ReadCallback, |
| 1633 base::Unretained(this))); | 1633 base::Unretained(this))); |
| 1634 base::RunLoop().RunUntilIdle(); | 1634 base::RunLoop().RunUntilIdle(); |
| 1635 | 1635 |
| 1636 // Make sure we're not downloading anymore. | 1636 // Make sure we're not downloading anymore. |
| 1637 EXPECT_EQ(data_source_->downloading(), false); | 1637 EXPECT_EQ(data_source_->downloading(), false); |
| 1638 Stop(); | 1638 Stop(); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 } // namespace media | 1641 } // namespace media |
| OLD | NEW |