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

Side by Side Diff: ppapi/tests/test_video_encoder.cc

Issue 905023005: Pepper: PPB_VideoEncoder implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest on win_chromium_x64_rel_ng Created 5 years, 9 months 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
« no previous file with comments | « ppapi/tests/test_video_encoder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/tests/test_video_encoder.h"
6
7 #include "ppapi/c/pp_codecs.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/cpp/video_encoder.h"
10 #include "ppapi/tests/testing_instance.h"
11
12 REGISTER_TEST_CASE(VideoEncoder);
13
14 bool TestVideoEncoder::Init() {
15 video_encoder_interface_ = static_cast<const PPB_VideoEncoder_0_1*>(
16 pp::Module::Get()->GetBrowserInterface(PPB_VIDEOENCODER_INTERFACE_0_1));
17 return video_encoder_interface_ && CheckTestingInterface();
18 }
19
20 void TestVideoEncoder::RunTests(const std::string& filter) {
21 RUN_CALLBACK_TEST(TestVideoEncoder, Create, filter);
22 }
23
24 std::string TestVideoEncoder::TestCreate() {
25 // Test that we get results for supported formats.
26 {
27 pp::VideoEncoder video_encoder(instance_);
28 ASSERT_FALSE(video_encoder.is_null());
29
30 TestCompletionCallbackWithOutput<std::vector<PP_VideoProfileDescription> >
31 callback(instance_->pp_instance(), false);
32 callback.WaitForResult(
33 video_encoder.GetSupportedProfiles(callback.GetCallback()));
34
35 ASSERT_GE(callback.output().size(), 0U);
36 }
37 // TODO(llandwerlin): add more tests once software video encode is
38 // available.
39
40 PASS();
41 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_video_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698