summaryrefslogtreecommitdiffstats
path: root/ppapi/tests
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 23:27:52 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 23:27:52 +0000
commit0599ea5f32330ec22080b4cf66ffa925b215ad69 (patch)
tree77fb552d252befd1c548c67066545cd4eeffda2e /ppapi/tests
parent93ae045c61dc86613b92b6fd910570df9845056f (diff)
downloadchromium_src-0599ea5f32330ec22080b4cf66ffa925b215ad69.zip
chromium_src-0599ea5f32330ec22080b4cf66ffa925b215ad69.tar.gz
chromium_src-0599ea5f32330ec22080b4cf66ffa925b215ad69.tar.bz2
Pepper: Remove ResourceArray_Dev.
It's no longer used. BUG= TBR=binji Review URL: https://codereview.chromium.org/123933006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r--ppapi/tests/all_c_includes.h1
-rw-r--r--ppapi/tests/all_cpp_includes.h1
-rw-r--r--ppapi/tests/test_resource_array.cc123
-rw-r--r--ppapi/tests/test_resource_array.h28
4 files changed, 0 insertions, 153 deletions
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h
index dd7f648..8dfae23 100644
--- a/ppapi/tests/all_c_includes.h
+++ b/ppapi/tests/all_c_includes.h
@@ -25,7 +25,6 @@
#include "ppapi/c/dev/ppb_ime_input_event_dev.h"
#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/c/dev/ppb_printing_dev.h"
-#include "ppapi/c/dev/ppb_resource_array_dev.h"
#include "ppapi/c/dev/ppb_scrollbar_dev.h"
#include "ppapi/c/dev/ppb_text_input_dev.h"
#include "ppapi/c/dev/ppb_trace_event_dev.h"
diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h
index 85e16e6..75cfbf8 100644
--- a/ppapi/tests/all_cpp_includes.h
+++ b/ppapi/tests/all_cpp_includes.h
@@ -25,7 +25,6 @@
#include "ppapi/cpp/dev/memory_dev.h"
#include "ppapi/cpp/dev/optional_dev.h"
#include "ppapi/cpp/dev/printing_dev.h"
-#include "ppapi/cpp/dev/resource_array_dev.h"
#include "ppapi/cpp/dev/scriptable_object_deprecated.h"
#include "ppapi/cpp/dev/scrollbar_dev.h"
#include "ppapi/cpp/dev/selection_dev.h"
diff --git a/ppapi/tests/test_resource_array.cc b/ppapi/tests/test_resource_array.cc
deleted file mode 100644
index 333505e..0000000
--- a/ppapi/tests/test_resource_array.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/tests/test_resource_array.h"
-
-#include "ppapi/cpp/dev/resource_array_dev.h"
-#include "ppapi/cpp/image_data.h"
-#include "ppapi/cpp/input_event.h"
-#include "ppapi/tests/testing_instance.h"
-
-REGISTER_TEST_CASE(ResourceArray);
-
-namespace {
-
-pp::InputEvent CreateMouseEvent(pp::Instance* instance,
- PP_InputEvent_Type type,
- PP_InputEvent_MouseButton buttons) {
- return pp::MouseInputEvent(
- instance,
- type,
- 100, // time_stamp
- 0, // modifiers
- buttons,
- pp::Point(), // position
- 1, // click count
- pp::Point()); // movement
-}
-
-pp::ImageData CreateImageData(pp::Instance* instance) {
- return pp::ImageData(
- instance,
- PP_IMAGEDATAFORMAT_RGBA_PREMUL,
- pp::Size(1, 1),
- true);
-}
-
-} // namespace
-
-TestResourceArray::TestResourceArray(TestingInstance* instance)
- : TestCase(instance) {
-}
-
-TestResourceArray::~TestResourceArray() {
-}
-
-void TestResourceArray::RunTests(const std::string& filter) {
- RUN_TEST(Basics, filter);
- RUN_TEST(OutOfRangeAccess, filter);
- RUN_TEST(EmptyArray, filter);
- RUN_TEST(InvalidElement, filter);
-}
-
-std::string TestResourceArray::TestBasics() {
- pp::InputEvent mouse_event_1 = CreateMouseEvent(
- instance_, PP_INPUTEVENT_TYPE_MOUSEDOWN, PP_INPUTEVENT_MOUSEBUTTON_LEFT);
- pp::InputEvent mouse_event_2 = CreateMouseEvent(
- instance_, PP_INPUTEVENT_TYPE_MOUSEUP, PP_INPUTEVENT_MOUSEBUTTON_RIGHT);
- pp::ImageData image_data = CreateImageData(instance_);
-
- PP_Resource elements[] = {
- mouse_event_1.pp_resource(),
- mouse_event_2.pp_resource(),
- image_data.pp_resource()
- };
- size_t size = sizeof(elements) / sizeof(elements[0]);
-
- pp::ResourceArray_Dev resource_array(instance_, elements, size);
-
- ASSERT_EQ(size, resource_array.size());
- for (uint32_t index = 0; index < size; ++index)
- ASSERT_EQ(elements[index], resource_array[index]);
-
- PASS();
-}
-
-std::string TestResourceArray::TestOutOfRangeAccess() {
- pp::InputEvent mouse_event_1 = CreateMouseEvent(
- instance_, PP_INPUTEVENT_TYPE_MOUSEDOWN, PP_INPUTEVENT_MOUSEBUTTON_LEFT);
- pp::InputEvent mouse_event_2 = CreateMouseEvent(
- instance_, PP_INPUTEVENT_TYPE_MOUSEUP, PP_INPUTEVENT_MOUSEBUTTON_RIGHT);
- pp::ImageData image_data = CreateImageData(instance_);
-
- PP_Resource elements[] = {
- mouse_event_1.pp_resource(),
- mouse_event_2.pp_resource(),
- image_data.pp_resource()
- };
- size_t size = sizeof(elements) / sizeof(elements[0]);
-
- pp::ResourceArray_Dev resource_array(instance_, elements, size);
- ASSERT_EQ(0, resource_array[size]);
- ASSERT_EQ(0, resource_array[size + 1]);
-
- PASS();
-}
-
-std::string TestResourceArray::TestEmptyArray() {
- pp::ResourceArray_Dev resource_array(instance_, NULL, 0);
- ASSERT_EQ(0, resource_array.size());
- PASS();
-}
-
-std::string TestResourceArray::TestInvalidElement() {
- pp::InputEvent mouse_event = CreateMouseEvent(
- instance_, PP_INPUTEVENT_TYPE_MOUSEDOWN, PP_INPUTEVENT_MOUSEBUTTON_LEFT);
- pp::ImageData image_data = CreateImageData(instance_);
-
- PP_Resource elements[] = {
- mouse_event.pp_resource(),
- 0,
- image_data.pp_resource()
- };
- size_t size = sizeof(elements) / sizeof(elements[0]);
-
- pp::ResourceArray_Dev resource_array(instance_, elements, size);
-
- ASSERT_EQ(size, resource_array.size());
- for (uint32_t index = 0; index < size; ++index)
- ASSERT_EQ(elements[index], resource_array[index]);
-
- PASS();
-}
diff --git a/ppapi/tests/test_resource_array.h b/ppapi/tests/test_resource_array.h
deleted file mode 100644
index b5dfcc9..0000000
--- a/ppapi/tests/test_resource_array.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_TESTS_TEST_RESOURCE_ARRAY_H_
-#define PPAPI_TESTS_TEST_RESOURCE_ARRAY_H_
-
-#include <string>
-
-#include "ppapi/tests/test_case.h"
-
-class TestResourceArray : public TestCase {
- public:
- explicit TestResourceArray(TestingInstance* instance);
- virtual ~TestResourceArray();
-
- // TestCase implementation.
- virtual void RunTests(const std::string& test_filter);
-
- private:
- std::string TestBasics();
- std::string TestOutOfRangeAccess();
- std::string TestEmptyArray();
- std::string TestInvalidElement();
-};
-
-#endif // PPAPI_TESTS_TEST_RESOURCE_ARRAY_H_
-