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

Side by Side Diff: webkit/media/buffered_resource_loader_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_resource_loader.cc ('k') | webkit/media/media_stream_client.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 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "media/base/media_log.h" 11 #include "media/base/media_log.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/http/http_request_headers.h" 13 #include "net/http/http_request_headers.h"
14 #include "net/http/http_util.h" 14 #include "net/http/http_util.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
21 #include "webkit/glue/media/buffered_resource_loader.h" 21 #include "webkit/media/buffered_resource_loader.h"
22 #include "webkit/mocks/mock_webframeclient.h" 22 #include "webkit/mocks/mock_webframeclient.h"
23 #include "webkit/mocks/mock_weburlloader.h" 23 #include "webkit/mocks/mock_weburlloader.h"
24 24
25 using ::testing::InSequence; 25 using ::testing::InSequence;
26 using ::testing::Return; 26 using ::testing::Return;
27 using ::testing::Truly; 27 using ::testing::Truly;
28 using ::testing::NiceMock; 28 using ::testing::NiceMock;
29 29
30 using WebKit::WebString; 30 using WebKit::WebString;
31 using WebKit::WebURLError; 31 using WebKit::WebURLError;
32 using WebKit::WebURLResponse; 32 using WebKit::WebURLResponse;
33 using WebKit::WebView; 33 using WebKit::WebView;
34 34
35 namespace webkit_glue { 35 using webkit_glue::MockWebFrameClient;
36 using webkit_glue::MockWebURLLoader;
37
38 namespace webkit_media {
36 39
37 static const char* kHttpUrl = "http://test"; 40 static const char* kHttpUrl = "http://test";
38 static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing"; 41 static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
39 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; 42 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
40 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; 43 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
41 static const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing"; 44 static const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing";
42 45
43 static const int kDataSize = 1024; 46 static const int kDataSize = 1024;
44 static const int kHttpOK = 200; 47 static const int kHttpOK = 200;
45 static const int kHttpPartialContent = 206; 48 static const int kHttpPartialContent = 206;
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } 1101 }
1099 1102
1100 TEST_F(BufferedResourceLoaderTest, BufferWindow_PlaybackRate_AboveUpperBound) { 1103 TEST_F(BufferedResourceLoaderTest, BufferWindow_PlaybackRate_AboveUpperBound) {
1101 Initialize(kHttpUrl, -1, -1); 1104 Initialize(kHttpUrl, -1, -1);
1102 Start(); 1105 Start();
1103 loader_->SetPlaybackRate(100); 1106 loader_->SetPlaybackRate(100);
1104 CheckBufferWindowBounds(); 1107 CheckBufferWindowBounds();
1105 StopWhenLoad(); 1108 StopWhenLoad();
1106 } 1109 }
1107 1110
1108 } // namespace webkit_glue 1111 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/buffered_resource_loader.cc ('k') | webkit/media/media_stream_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698