summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 22:52:59 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 22:52:59 +0000
commitebc5c8be10f0b82b428064c50be6e6a42861b9e1 (patch)
tree4f693c544d1eb2da200952e499599b1656041f81 /ppapi
parentdc4b7d54f623020348ef98136d9776c7e0693b18 (diff)
downloadchromium_src-ebc5c8be10f0b82b428064c50be6e6a42861b9e1.zip
chromium_src-ebc5c8be10f0b82b428064c50be6e6a42861b9e1.tar.gz
chromium_src-ebc5c8be10f0b82b428064c50be6e6a42861b9e1.tar.bz2
Fix PPAPI ui_tests.
r66321 silently broke it because we were not running the tests, just listing the tests and yet returning success. This fixes it as well as some regressions in the tests themselves. BUG=none TEST=ui_tests Review URL: http://codereview.chromium.org/7055002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/tests/test_case.html2
-rw-r--r--ppapi/tests/test_graphics_2d.cc4
-rw-r--r--ppapi/tests/test_image_data.cc6
-rw-r--r--ppapi/tests/testing_instance.cc3
4 files changed, 8 insertions, 7 deletions
diff --git a/ppapi/tests/test_case.html b/ppapi/tests/test_case.html
index d055e52..66d6ffd 100644
--- a/ppapi/tests/test_case.html
+++ b/ppapi/tests/test_case.html
@@ -79,7 +79,7 @@ onload = function() {
} else {
var mimeType = "application/x-ppapi-tests";
if (mimeType in navigator.mimeTypes) {
- obj = document.createElement("OBJECT");
+ obj = document.createElement("EMBED");
obj.setAttribute("type", mimeType);
} else {
document.getElementById("console").innerHTML =
diff --git a/ppapi/tests/test_graphics_2d.cc b/ppapi/tests/test_graphics_2d.cc
index 32f12cd..28483b4 100644
--- a/ppapi/tests/test_graphics_2d.cc
+++ b/ppapi/tests/test_graphics_2d.cc
@@ -243,12 +243,12 @@ std::string TestGraphics2D::TestInvalidSize() {
size.width = 16;
size.height = -16;
ASSERT_FALSE(!!graphics_2d_interface_->Create(
- pp::Module::Get()->pp_module(), &size, PP_FALSE));
+ instance_->pp_instance(), &size, PP_FALSE));
size.width = -16;
size.height = 16;
ASSERT_FALSE(!!graphics_2d_interface_->Create(
- pp::Module::Get()->pp_module(), &size, PP_FALSE));
+ instance_->pp_instance(), &size, PP_FALSE));
PASS();
}
diff --git a/ppapi/tests/test_image_data.cc b/ppapi/tests/test_image_data.cc
index ab8894a..ed130cd 100644
--- a/ppapi/tests/test_image_data.cc
+++ b/ppapi/tests/test_image_data.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -60,7 +60,7 @@ std::string TestImageData::TestInvalidSize() {
negative_height.width = 16;
negative_height.height = -2;
PP_Resource rsrc = image_data_interface_->Create(
- pp::Module::Get()->pp_module(),
+ instance_->pp_instance(),
PP_IMAGEDATAFORMAT_BGRA_PREMUL,
&negative_height, PP_TRUE);
if (rsrc)
@@ -70,7 +70,7 @@ std::string TestImageData::TestInvalidSize() {
negative_width.width = -2;
negative_width.height = 16;
rsrc = image_data_interface_->Create(
- pp::Module::Get()->pp_module(),
+ instance_->pp_instance(),
PP_IMAGEDATAFORMAT_BGRA_PREMUL,
&negative_width, PP_TRUE);
if (rsrc)
diff --git a/ppapi/tests/testing_instance.cc b/ppapi/tests/testing_instance.cc
index ca82b5c..f464214 100644
--- a/ppapi/tests/testing_instance.cc
+++ b/ppapi/tests/testing_instance.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -112,6 +112,7 @@ void TestingInstance::ExecuteTests(int32_t unused) {
LogError("Plugin initialization failed: " + errors_);
} else if (!current_case_) {
LogAvailableTests();
+ errors_.append("FAIL: Only listed tests");
} else {
current_case_->RunTest();
}