summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_video_decoder.cc
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:25:38 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:25:38 +0000
commitc8423065a0054dc81e72801dfd60b99483f70b79 (patch)
treec23140bb47c7edfb80309ffa767ba301167acb8b /ppapi/tests/test_video_decoder.cc
parent94bef5ad7ddd08327f7d80d50a187c86d78fccf7 (diff)
downloadchromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.zip
chromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.tar.gz
chromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.tar.bz2
PPB_VideoDecoder_Dev::Initialize is now synchronous!
Apparently flash can't deal with async init, so we make it synchronous. We keep processing in the GPU process asynchronous and just take the blocking hit on the renderer. BUG=none TEST=gles2, ovdatest, trybots Review URL: http://codereview.chromium.org/7474006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_video_decoder.cc')
-rw-r--r--ppapi/tests/test_video_decoder.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/ppapi/tests/test_video_decoder.cc b/ppapi/tests/test_video_decoder.cc
index f4f2678..9b9d965 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();
}