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

Unified Diff: ppapi/tests/test_video_decoder.cc

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR update. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/tests/test_video_decoder.h ('k') | ppapi/thunk/ppb_video_decoder_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9b9d9656bb1c6c1c0d0c5d5ef12e95a99b652823 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 & configs";
PASS();
}
« no previous file with comments | « ppapi/tests/test_video_decoder.h ('k') | ppapi/thunk/ppb_video_decoder_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698