OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/video_decode_acceleration_support_mac.h" | 5 #include "ui/gfx/video_decode_acceleration_support_mac.h" |
6 | 6 |
7 #import "base/bind.h" | 7 #import "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #import "base/mac/foundation_util.h" | 9 #import "base/mac/foundation_util.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 } // namespace | 64 } // namespace |
65 | 65 |
66 namespace gfx { | 66 namespace gfx { |
67 | 67 |
68 class VideoDecodeAccelerationSupportTest : public ui::CocoaTest { | 68 class VideoDecodeAccelerationSupportTest : public ui::CocoaTest { |
69 }; | 69 }; |
70 | 70 |
71 // Test that creating VideoDecodeAccelerationSupport works on hardware that | 71 // Test that creating VideoDecodeAccelerationSupport works on hardware that |
72 // supports it. | 72 // supports it. |
73 TEST_F(VideoDecodeAccelerationSupportTest, Create) { | 73 // http://crbug.com/103912 |
| 74 TEST_F(VideoDecodeAccelerationSupportTest, DISABLED_Create) { |
74 scoped_refptr<gfx::VideoDecodeAccelerationSupport> vda( | 75 scoped_refptr<gfx::VideoDecodeAccelerationSupport> vda( |
75 new gfx::VideoDecodeAccelerationSupport); | 76 new gfx::VideoDecodeAccelerationSupport); |
76 gfx::VideoDecodeAccelerationSupport::Status status = vda->Create( | 77 gfx::VideoDecodeAccelerationSupport::Status status = vda->Create( |
77 kSampleWidth, kSampleHeight, kCVPixelFormatType_422YpCbCr8, | 78 kSampleWidth, kSampleHeight, kCVPixelFormatType_422YpCbCr8, |
78 kSampleAVCData, arraysize(kSampleAVCData)); | 79 kSampleAVCData, arraysize(kSampleAVCData)); |
79 | 80 |
80 // We should get an error loading the framework on 10.6.2 and earlier. | 81 // We should get an error loading the framework on 10.6.2 and earlier. |
81 if (!OSShouldHaveFramework()) { | 82 if (!OSShouldHaveFramework()) { |
82 EXPECT_EQ(gfx::VideoDecodeAccelerationSupport::LOAD_FRAMEWORK_ERROR, | 83 EXPECT_EQ(gfx::VideoDecodeAccelerationSupport::LOAD_FRAMEWORK_ERROR, |
83 status); | 84 status); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Wait for the thread to complete. | 121 // Wait for the thread to complete. |
121 thread.Stop(); | 122 thread.Stop(); |
122 | 123 |
123 // Verify that the callback occured. | 124 // Verify that the callback occured. |
124 EXPECT_FALSE(callback_done); | 125 EXPECT_FALSE(callback_done); |
125 loop.RunAllPending(); | 126 loop.RunAllPending(); |
126 EXPECT_TRUE(callback_done); | 127 EXPECT_TRUE(callback_done); |
127 } | 128 } |
128 | 129 |
129 } // namespace gfx | 130 } // namespace gfx |
OLD | NEW |