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

Side by Side Diff: webkit/media/buffered_data_source_unittest.cc

Issue 8570010: Moving media-related files from webkit/glue/ to webkit/media/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: minor fixes Created 9 years, 1 month 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 | « webkit/media/buffered_data_source.cc ('k') | webkit/media/buffered_resource_loader.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "media/base/media_log.h" 9 #include "media/base/media_log.h"
10 #include "media/base/mock_callback.h" 10 #include "media/base/mock_callback.h"
11 #include "media/base/mock_filter_host.h" 11 #include "media/base/mock_filter_host.h"
12 #include "media/base/mock_filters.h" 12 #include "media/base/mock_filters.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
17 #include "webkit/glue/media/buffered_data_source.h" 17 #include "webkit/media/buffered_data_source.h"
18 #include "webkit/mocks/mock_webframeclient.h" 18 #include "webkit/mocks/mock_webframeclient.h"
19 #include "webkit/mocks/mock_weburlloader.h" 19 #include "webkit/mocks/mock_weburlloader.h"
20 20
21 using ::testing::_; 21 using ::testing::_;
22 using ::testing::Assign; 22 using ::testing::Assign;
23 using ::testing::AtLeast; 23 using ::testing::AtLeast;
24 using ::testing::DeleteArg; 24 using ::testing::DeleteArg;
25 using ::testing::DoAll; 25 using ::testing::DoAll;
26 using ::testing::InSequence; 26 using ::testing::InSequence;
27 using ::testing::Invoke; 27 using ::testing::Invoke;
28 using ::testing::InvokeWithoutArgs; 28 using ::testing::InvokeWithoutArgs;
29 using ::testing::NotNull; 29 using ::testing::NotNull;
30 using ::testing::Return; 30 using ::testing::Return;
31 using ::testing::ReturnRef; 31 using ::testing::ReturnRef;
32 using ::testing::SetArgumentPointee; 32 using ::testing::SetArgumentPointee;
33 using ::testing::StrictMock; 33 using ::testing::StrictMock;
34 using ::testing::NiceMock; 34 using ::testing::NiceMock;
35 using ::testing::WithArgs; 35 using ::testing::WithArgs;
36 36
37 using WebKit::WebFrame; 37 using WebKit::WebFrame;
38 using WebKit::WebString; 38 using WebKit::WebString;
39 using WebKit::WebURLError; 39 using WebKit::WebURLError;
40 using WebKit::WebURLResponse; 40 using WebKit::WebURLResponse;
41 using WebKit::WebView; 41 using WebKit::WebView;
42 42
43 namespace webkit_glue { 43 using webkit_glue::MockWebFrameClient;
44 using webkit_glue::MockWebURLLoader;
45
46 namespace webkit_media {
44 47
45 static const char* kHttpUrl = "http://test"; 48 static const char* kHttpUrl = "http://test";
46 static const char* kFileUrl = "file://test"; 49 static const char* kFileUrl = "file://test";
47 static const int kDataSize = 1024; 50 static const int kDataSize = 1024;
48 static const int kMaxCacheMissesBeforeFailTest = 20; 51 static const int kMaxCacheMissesBeforeFailTest = 20;
49 52
50 enum NetworkState { 53 enum NetworkState {
51 NONE, 54 NONE,
52 LOADED, 55 LOADED,
53 LOADING 56 LOADING
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 NewReadCallback(media::DataSource::kReadError)); 781 NewReadCallback(media::DataSource::kReadError));
779 message_loop_->RunAllPending(); 782 message_loop_->RunAllPending();
780 783
781 // Verify loader changed but still has same bitrate. 784 // Verify loader changed but still has same bitrate.
782 EXPECT_NE(old_loader, data_source_->loader().get()); 785 EXPECT_NE(old_loader, data_source_->loader().get());
783 EXPECT_EQ(2.0f, loader_playback_rate()); 786 EXPECT_EQ(2.0f, loader_playback_rate());
784 787
785 StopDataSource(); 788 StopDataSource();
786 } 789 }
787 790
788 } // namespace webkit_glue 791 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/buffered_data_source.cc ('k') | webkit/media/buffered_resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698