Chromium Code Reviews| Index: ppapi/tests/test_video_decoder.cc |
| diff --git a/ppapi/tests/test_video_decoder.cc b/ppapi/tests/test_video_decoder.cc |
| index f4f2678b9b6b9d2074d146b6b50f63249fdfd9e9..aa33ce7f0d206c7726b926ea469cd7dfcb6cdde9 100644 |
| --- a/ppapi/tests/test_video_decoder.cc |
| +++ b/ppapi/tests/test_video_decoder.cc |
| @@ -15,30 +15,22 @@ REGISTER_TEST_CASE(VideoDecoder); |
| bool TestVideoDecoder::Init() { |
| video_decoder_interface_ = reinterpret_cast<PPB_VideoDecoder_Dev const*>( |
| pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE)); |
| - var_interface_ = reinterpret_cast<PPB_Var const*>( |
| - pp::Module::Get()->GetBrowserInterface(PPB_VAR_INTERFACE)); |
| - return video_decoder_interface_ && var_interface_ && InitTestingInterface(); |
| + return video_decoder_interface_ && InitTestingInterface(); |
| } |
| void TestVideoDecoder::RunTest() { |
| - RUN_TEST(CreateAndInitialize); |
| + RUN_TEST(CreateFailure); |
| } |
| void TestVideoDecoder::QuitMessageLoop() { |
| testing_interface_->QuitMessageLoop(instance_->pp_instance()); |
| } |
| -std::string TestVideoDecoder::TestCreateAndInitialize() { |
| +std::string TestVideoDecoder::TestCreateFailure() { |
| PP_Resource decoder = video_decoder_interface_->Create( |
| - instance_->pp_instance()); |
| - if (decoder == 0) |
| - return "Create: error creating the decoder"; |
| - |
| - int32_t pp_error = video_decoder_interface_->Initialize( |
| - decoder, 0, NULL, PP_BlockUntilComplete()); |
| - pp::Module::Get()->core()->ReleaseResource(decoder); |
| - if (pp_error != PP_ERROR_BADARGUMENT) |
| - return "Initialize: error detecting null callback"; |
| + instance_->pp_instance(), 0, NULL); |
| + if (decoder != 0) |
| + return "Create: error detecting invalid context"; |
|
vrk (LEFT CHROMIUM)
2011/07/29 18:11:02
nit: technically the configs are invalid, too. Dun
Ami GONE FROM CHROMIUM
2011/07/29 18:20:41
I don't, but done.
|
| PASS(); |
| } |