summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 04:54:48 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 04:54:48 +0000
commit71214c0bf0da8f14d76f38f3aae3387c80742c12 (patch)
tree522ab1a5ba777ba88e5ffdf7fc59902d25f6026e /cc
parentb19fe57d192a89e1bc2fd55ede8037bed4df347a (diff)
downloadchromium_src-71214c0bf0da8f14d76f38f3aae3387c80742c12.zip
chromium_src-71214c0bf0da8f14d76f38f3aae3387c80742c12.tar.gz
chromium_src-71214c0bf0da8f14d76f38f3aae3387c80742c12.tar.bz2
cc: Re-enable the VideoResourceUpdater tests.
The yuv data arrays were sized for a 1x1 video frame, but the frame size was changed to be 10x10, so we were reading off the end of the arrays and blowing up on ASAN. The tests now pass ASAN locally again. R=piman,enne BUG=260920 Review URL: https://chromiumcodereview.appspot.com/19641002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/resources/video_resource_updater_unittest.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index 5fc03f9..95b3124 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -28,10 +28,11 @@ class VideoResourceUpdaterTest : public testing::Test {
}
scoped_refptr<media::VideoFrame> CreateTestYUVVideoFrame() {
- gfx::Size size(10, 10);
- static uint8 y_data[10] = { 0 };
- static uint8 u_data[5] = { 0 };
- static uint8 v_data[5] = { 0 };
+ const int kDimension = 10;
+ gfx::Size size(kDimension, kDimension);
+ static uint8 y_data[kDimension * kDimension] = { 0 };
+ static uint8 u_data[kDimension * kDimension / 2] = { 0 };
+ static uint8 v_data[kDimension * kDimension / 2] = { 0 };
return media::VideoFrame::WrapExternalYuvData(
media::VideoFrame::YV16, // format
@@ -54,8 +55,7 @@ class VideoResourceUpdaterTest : public testing::Test {
scoped_ptr<ResourceProvider> resource_provider3d_;
};
-// TODO(danakj): Fix this test on ASAN: crbug.com/260920
-TEST_F(VideoResourceUpdaterTest, DISABLED_SoftwareFrame) {
+TEST_F(VideoResourceUpdaterTest, SoftwareFrame) {
VideoResourceUpdater updater(resource_provider3d_.get());
scoped_refptr<media::VideoFrame> video_frame = CreateTestYUVVideoFrame();
@@ -64,8 +64,7 @@ TEST_F(VideoResourceUpdaterTest, DISABLED_SoftwareFrame) {
EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
}
-// TODO(danakj): Fix this test on ASAN: crbug.com/260920
-TEST_F(VideoResourceUpdaterTest, DISABLED_LostContextForSoftwareFrame) {
+TEST_F(VideoResourceUpdaterTest, LostContextForSoftwareFrame) {
VideoResourceUpdater updater(resource_provider3d_.get());
scoped_refptr<media::VideoFrame> video_frame = CreateTestYUVVideoFrame();