| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "platform/graphics/RecordingImageBufferSurface.h" | 5 #include "platform/graphics/RecordingImageBufferSurface.h" |
| 6 | 6 |
| 7 #include "platform/graphics/GraphicsContext.h" | 7 #include "platform/graphics/GraphicsContext.h" |
| 8 #include "platform/graphics/ImageBuffer.h" | 8 #include "platform/graphics/ImageBuffer.h" |
| 9 #include "platform/graphics/ImageBufferClient.h" | 9 #include "platform/graphics/ImageBufferClient.h" |
| 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 CurrentThreadMock m_currentThread; | 339 CurrentThreadMock m_currentThread; |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 } // anonymous namespace | 342 } // anonymous namespace |
| 343 | 343 |
| 344 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD)
\ | 344 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD)
\ |
| 345 {
\ | 345 {
\ |
| 346 CurrentThreadPlatformMock ctpm;
\ | 346 CurrentThreadPlatformMock ctpm;
\ |
| 347 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK
_FROM_HERE, bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, this)); \ | 347 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK
_FROM_HERE, bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, WTF::unretained(
this))); \ |
| 348 ctpm.enterRunLoop(); \ | 348 ctpm.enterRunLoop(); \ |
| 349 } | 349 } |
| 350 | 350 |
| 351 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) | 351 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) |
| 352 { | 352 { |
| 353 testEmptyPicture(); | 353 testEmptyPicture(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear) | 356 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear) |
| 357 { | 357 { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 384 expectDisplayListEnabled(true); | 384 expectDisplayListEnabled(true); |
| 385 } | 385 } |
| 386 | 386 |
| 387 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) | 387 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) |
| 388 { | 388 { |
| 389 CALL_TEST_TASK_WRAPPER(testClearRect); | 389 CALL_TEST_TASK_WRAPPER(testClearRect); |
| 390 expectDisplayListEnabled(true); | 390 expectDisplayListEnabled(true); |
| 391 } | 391 } |
| 392 | 392 |
| 393 } // namespace blink | 393 } // namespace blink |
| OLD | NEW |