Skip to content

Commit

Permalink
Rename PPB_VideoDecoder_Dev test and example code to avoid collisions.
Browse files Browse the repository at this point in the history
BUG=281689
R=fischman@chromium.org, teravest@chromium.org

Review URL: https://codereview.chromium.org/269283002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268797 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
bbudge@chromium.org committed May 7, 2014
1 parent b233a58 commit 402ed25
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions chrome/test/ppapi/ppapi_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ TEST_PPAPI_IN_PROCESS(Memory)
TEST_PPAPI_OUT_OF_PROCESS(Memory)
TEST_PPAPI_NACL(Memory)

TEST_PPAPI_IN_PROCESS(VideoDecoder)
TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder)
TEST_PPAPI_IN_PROCESS(VideoDecoderDev)
TEST_PPAPI_OUT_OF_PROCESS(VideoDecoderDev)

// FileIO tests.
#define RUN_FILEIO_SUBTESTS \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <string.h>

#include <iostream>
#include <sstream>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <vector>

#include "ppapi/c/pp_errors.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
found in the LICENSE file.
-->
<head>
<title>Video Decode Example</title>
<title>Video Decode (Dev) Example</title>
</head>

<body>

<embed id="plugin" type="application/x-ppapi-example-video-decode"
<embed id="plugin" type="application/x-ppapi-example-video-decode-dev"
width="640" height="480"/>

</body>
Expand Down
4 changes: 2 additions & 2 deletions ppapi/ppapi_sources.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@
'tests/test_url_util.h',
'tests/test_utils.cc',
'tests/test_utils.h',
'tests/test_video_decoder.cc',
'tests/test_video_decoder.h',
'tests/test_video_decoder_dev.cc',
'tests/test_video_decoder_dev.h',
'tests/test_x509_certificate_private.cc',
'tests/test_x509_certificate_private.h',

Expand Down
4 changes: 2 additions & 2 deletions ppapi/ppapi_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
],
},
{
'target_name': 'ppapi_example_video_decode',
'target_name': 'ppapi_example_video_decode_dev',
'dependencies': [
'ppapi_example_skeleton',
'ppapi.gyp:ppapi_cpp',
Expand All @@ -453,7 +453,7 @@
'lib/gl/include',
],
'sources': [
'examples/video_decode/video_decode.cc',
'examples/video_decode/video_decode_dev.cc',
'examples/video_decode/testdata.h',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/tests/test_video_decoder.h"
#include "ppapi/tests/test_video_decoder_dev.h"

#include "ppapi/c/dev/ppb_video_decoder_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_var.h"
#include "ppapi/tests/testing_instance.h"

REGISTER_TEST_CASE(VideoDecoder);
REGISTER_TEST_CASE(VideoDecoderDev);

bool TestVideoDecoder::Init() {
bool TestVideoDecoderDev::Init() {
video_decoder_interface_ = static_cast<const PPB_VideoDecoder_Dev*>(
pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE));
return video_decoder_interface_ && CheckTestingInterface();
}

void TestVideoDecoder::RunTests(const std::string& filter) {
void TestVideoDecoderDev::RunTests(const std::string& filter) {
RUN_TEST(CreateFailure, filter);
}

void TestVideoDecoder::QuitMessageLoop() {
void TestVideoDecoderDev::QuitMessageLoop() {
testing_interface_->QuitMessageLoop(instance_->pp_instance());
}

std::string TestVideoDecoder::TestCreateFailure() {
std::string TestVideoDecoderDev::TestCreateFailure() {
PP_Resource decoder = video_decoder_interface_->Create(
instance_->pp_instance(), 0, static_cast<PP_VideoDecoder_Profile>(-1));
if (decoder != 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_TESTS_TEST_VIDEO_DECODER_H_
#define PPAPI_TESTS_TEST_VIDEO_DECODER_H_
#ifndef PPAPI_TESTS_TEST_VIDEO_DECODER_DEV_H_
#define PPAPI_TESTS_TEST_VIDEO_DECODER_DEV_H_

#include <string>

#include "ppapi/c/dev/ppb_video_decoder_dev.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/tests/test_case.h"

class TestVideoDecoder : public TestCase {
class TestVideoDecoderDev : public TestCase {
public:
explicit TestVideoDecoder(TestingInstance* instance) : TestCase(instance) {}
explicit TestVideoDecoderDev(TestingInstance* instance)
: TestCase(instance) {}

// TestCase implementation.
virtual bool Init();
Expand All @@ -28,4 +29,4 @@ class TestVideoDecoder : public TestCase {
const PPB_VideoDecoder_Dev* video_decoder_interface_;
};

#endif // PPAPI_TESTS_TEST_VIDEO_DECODER_H_
#endif // PPAPI_TESTS_TEST_VIDEO_DECODER_DEV_H_

0 comments on commit 402ed25

Please sign in to comment.