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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 protected: | 144 protected: |
145 ~TestUrlData() override {} | 145 ~TestUrlData() override {} |
146 const int block_shift_; | 146 const int block_shift_; |
147 | 147 |
148 std::unique_ptr<TestResourceMultiBuffer> test_multibuffer_; | 148 std::unique_ptr<TestResourceMultiBuffer> test_multibuffer_; |
149 }; | 149 }; |
150 | 150 |
151 class TestUrlIndex : public UrlIndex { | 151 class TestUrlIndex : public UrlIndex { |
152 public: | 152 public: |
153 explicit TestUrlIndex(blink::WebFrame* frame) : UrlIndex(frame) {} | 153 explicit TestUrlIndex(blink::WebLocalFrame* frame) : UrlIndex(frame) {} |
154 | 154 |
155 scoped_refptr<UrlData> NewUrlData(const GURL& url, | 155 scoped_refptr<UrlData> NewUrlData(const GURL& url, |
156 UrlData::CORSMode cors_mode) override { | 156 UrlData::CORSMode cors_mode) override { |
157 last_url_data_ = | 157 last_url_data_ = |
158 new TestUrlData(url, cors_mode, weak_factory_.GetWeakPtr()); | 158 new TestUrlData(url, cors_mode, weak_factory_.GetWeakPtr()); |
159 return last_url_data_; | 159 return last_url_data_; |
160 } | 160 } |
161 | 161 |
162 scoped_refptr<TestUrlData> last_url_data() { | 162 scoped_refptr<TestUrlData> last_url_data() { |
163 EXPECT_TRUE(last_url_data_); | 163 EXPECT_TRUE(last_url_data_); |
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 base::Bind(&MultibufferDataSourceTest::ReadCallback, | 1621 base::Bind(&MultibufferDataSourceTest::ReadCallback, |
1622 base::Unretained(this))); | 1622 base::Unretained(this))); |
1623 base::RunLoop().RunUntilIdle(); | 1623 base::RunLoop().RunUntilIdle(); |
1624 | 1624 |
1625 // Make sure we're not downloading anymore. | 1625 // Make sure we're not downloading anymore. |
1626 EXPECT_EQ(data_source_->downloading(), false); | 1626 EXPECT_EQ(data_source_->downloading(), false); |
1627 Stop(); | 1627 Stop(); |
1628 } | 1628 } |
1629 | 1629 |
1630 } // namespace media | 1630 } // namespace media |
OLD | NEW |