Add an exponential backoff to rechecking the app list doodle.
[chromium-blink-merge.git] / ppapi / tests / test_video_decoder_dev.cc
blob86c2c13278185fcb3c7e3f5e17920b1932bd1544
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
3 // found in the LICENSE file.
5 #include "ppapi/tests/test_video_decoder_dev.h"
7 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/ppb_var.h"
10 #include "ppapi/tests/testing_instance.h"
12 REGISTER_TEST_CASE(VideoDecoderDev);
14 bool TestVideoDecoderDev::Init() {
15 video_decoder_interface_ = static_cast<const PPB_VideoDecoder_Dev*>(
16 pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE));
17 return video_decoder_interface_ && CheckTestingInterface();
20 void TestVideoDecoderDev::RunTests(const std::string& filter) {
21 RUN_TEST(CreateFailure, filter);
24 void TestVideoDecoderDev::QuitMessageLoop() {
25 testing_interface_->QuitMessageLoop(instance_->pp_instance());
28 std::string TestVideoDecoderDev::TestCreateFailure() {
29 PP_Resource decoder = video_decoder_interface_->Create(
30 instance_->pp_instance(), 0, static_cast<PP_VideoDecoder_Profile>(-1));
31 if (decoder != 0)
32 return "Create: error detecting invalid context & configs";
34 PASS();