Change DtmfSenderHandler to handle events on the signaling thread.
[chromium-blink-merge.git] / cc / trees / layer_tree_host_pixeltest_synchronous.cc
blobc22075f768225ce89667c3fbe473153433bf42dc
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
3 // found in the LICENSE file.
5 #include "build/build_config.h"
6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_image_layer.h"
8 #include "cc/layers/picture_layer.h"
9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/test/fake_content_layer_client.h"
11 #include "cc/test/layer_tree_pixel_test.h"
12 #include "cc/test/pixel_comparator.h"
14 #if !defined(OS_ANDROID)
16 namespace cc {
17 namespace {
19 class LayerTreeHostSynchronousPixelTest : public LayerTreePixelTest {
20 public:
21 void InitializeSettings(LayerTreeSettings* settings) override {
22 LayerTreePixelTest::InitializeSettings(settings);
23 settings->single_thread_proxy_scheduler = false;
26 void BeginTest() override {
27 LayerTreePixelTest::BeginTest();
28 PostCompositeImmediatelyToMainThread();
32 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) {
33 gfx::Size bounds(200, 200);
35 FakeContentLayerClient client;
36 SkPaint green_paint;
37 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
38 client.add_draw_rect(gfx::RectF(bounds), green_paint);
39 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
40 root->SetBounds(bounds);
41 root->SetIsDrawable(true);
43 RunSingleThreadedPixelTest(
44 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
47 } // namespace
48 } // namespace cc
50 #endif // OS_ANDROID