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 "config.h" | 5 #include "config.h" |
6 #include "platform/graphics/RecordingImageBufferSurface.h" | 6 #include "platform/graphics/RecordingImageBufferSurface.h" |
7 | 7 |
8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
9 #include "platform/graphics/ImageBuffer.h" | 9 #include "platform/graphics/ImageBuffer.h" |
10 #include "platform/graphics/ImageBufferClient.h" | 10 #include "platform/graphics/ImageBufferClient.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 public:
\ | 357 public:
\ |
358 TestWrapperTask_ ## TEST_METHOD(RecordingImageBufferSurfaceTest* test) :
m_test(test) { } \ | 358 TestWrapperTask_ ## TEST_METHOD(RecordingImageBufferSurfaceTest* test) :
m_test(test) { } \ |
359 void run() override { m_test->TEST_METHOD(); }
\ | 359 void run() override { m_test->TEST_METHOD(); }
\ |
360 private:
\ | 360 private:
\ |
361 RecordingImageBufferSurfaceTest* m_test;
\ | 361 RecordingImageBufferSurfaceTest* m_test;
\ |
362 }; | 362 }; |
363 | 363 |
364 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD)
\ | 364 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD)
\ |
365 {
\ | 365 {
\ |
366 AutoInstallCurrentThreadPlatformMock ctpm;
\ | 366 AutoInstallCurrentThreadPlatformMock ctpm;
\ |
367 Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE,
new TestWrapperTask_ ## TEST_METHOD(this)); \ | 367 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_
HERE, new TestWrapperTask_ ## TEST_METHOD(this)); \ |
368 ctpm.enterRunLoop(); \ | 368 ctpm.enterRunLoop(); \ |
369 } | 369 } |
370 | 370 |
371 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) | 371 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) |
372 { | 372 { |
373 testEmptyPicture(); | 373 testEmptyPicture(); |
374 } | 374 } |
375 | 375 |
376 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear) | 376 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear) |
377 { | 377 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } | 410 } |
411 | 411 |
412 DEFINE_TEST_TASK_WRAPPER_CLASS(testClearRect) | 412 DEFINE_TEST_TASK_WRAPPER_CLASS(testClearRect) |
413 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) | 413 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) |
414 { | 414 { |
415 CALL_TEST_TASK_WRAPPER(testClearRect); | 415 CALL_TEST_TASK_WRAPPER(testClearRect); |
416 expectDisplayListEnabled(true); | 416 expectDisplayListEnabled(true); |
417 } | 417 } |
418 | 418 |
419 } // namespace blink | 419 } // namespace blink |
OLD | NEW |