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

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

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years 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 | « ppapi/tests/test_var_deprecated.cc ('k') | ppapi/tests/test_websocket.cc » ('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 "ppapi/tests/test_video_decoder.h" 5 #include "ppapi/tests/test_video_decoder.h"
6 6
7 #include "ppapi/c/dev/ppb_video_decoder_dev.h" 7 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
8 #include "ppapi/c/dev/ppb_testing_dev.h" 8 #include "ppapi/c/dev/ppb_testing_dev.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/ppb_var.h" 10 #include "ppapi/c/ppb_var.h"
11 #include "ppapi/tests/testing_instance.h" 11 #include "ppapi/tests/testing_instance.h"
12 12
13 REGISTER_TEST_CASE(VideoDecoder); 13 REGISTER_TEST_CASE(VideoDecoder);
14 14
15 bool TestVideoDecoder::Init() { 15 bool TestVideoDecoder::Init() {
16 video_decoder_interface_ = static_cast<const PPB_VideoDecoder_Dev*>( 16 video_decoder_interface_ = static_cast<const PPB_VideoDecoder_Dev*>(
17 pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE)); 17 pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE));
18 return video_decoder_interface_ && InitTestingInterface(); 18 return video_decoder_interface_ && CheckTestingInterface();
19 } 19 }
20 20
21 void TestVideoDecoder::RunTests(const std::string& filter) { 21 void TestVideoDecoder::RunTests(const std::string& filter) {
22 RUN_TEST(CreateFailure, filter); 22 RUN_TEST(CreateFailure, filter);
23 } 23 }
24 24
25 void TestVideoDecoder::QuitMessageLoop() { 25 void TestVideoDecoder::QuitMessageLoop() {
26 testing_interface_->QuitMessageLoop(instance_->pp_instance()); 26 testing_interface_->QuitMessageLoop(instance_->pp_instance());
27 } 27 }
28 28
29 std::string TestVideoDecoder::TestCreateFailure() { 29 std::string TestVideoDecoder::TestCreateFailure() {
30 PP_Resource decoder = video_decoder_interface_->Create( 30 PP_Resource decoder = video_decoder_interface_->Create(
31 instance_->pp_instance(), 0, static_cast<PP_VideoDecoder_Profile>(-1)); 31 instance_->pp_instance(), 0, static_cast<PP_VideoDecoder_Profile>(-1));
32 if (decoder != 0) 32 if (decoder != 0)
33 return "Create: error detecting invalid context & configs"; 33 return "Create: error detecting invalid context & configs";
34 34
35 PASS(); 35 PASS();
36 } 36 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_var_deprecated.cc ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698