OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 class CompositedLayerMappingTest : public testing::Test { | 55 class CompositedLayerMappingTest : public testing::Test { |
56 public: | 56 public: |
57 CompositedLayerMappingTest() | 57 CompositedLayerMappingTest() |
58 : m_baseURL("http://www.test.com/") | 58 : m_baseURL("http://www.test.com/") |
59 { | 59 { |
60 // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because t
he compositing | 60 // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because t
he compositing |
61 // settings need to be set before the page is loaded. | 61 // settings need to be set before the page is loaded. |
62 m_mainFrame = WebLocalFrame::create(&m_mockWebFrameClient); | 62 m_mainFrame = WebLocalFrame::create(&m_mockWebFrameClient); |
63 m_webViewImpl = toWebViewImpl(WebView::create(&m_mockWebViewClient)); | 63 m_webViewImpl = toWebViewImpl(WebView::create(&m_mockWebViewClient)); |
64 m_webViewImpl->settings()->setForceCompositingMode(true); | |
65 m_webViewImpl->settings()->setAcceleratedCompositingEnabled(true); | 64 m_webViewImpl->settings()->setAcceleratedCompositingEnabled(true); |
66 m_webViewImpl->settings()->setAcceleratedCompositingForFixedPositionEnab
led(true); | 65 m_webViewImpl->settings()->setAcceleratedCompositingForFixedPositionEnab
led(true); |
67 m_webViewImpl->settings()->setAcceleratedCompositingForOverflowScrollEna
bled(true); | 66 m_webViewImpl->settings()->setAcceleratedCompositingForOverflowScrollEna
bled(true); |
68 m_webViewImpl->settings()->setCompositedScrollingForFramesEnabled(true); | 67 m_webViewImpl->settings()->setCompositedScrollingForFramesEnabled(true); |
69 m_webViewImpl->setMainFrame(m_mainFrame); | 68 m_webViewImpl->setMainFrame(m_mainFrame); |
70 m_webViewImpl->resize(IntSize(320, 240)); | 69 m_webViewImpl->resize(IntSize(320, 240)); |
71 } | 70 } |
72 | 71 |
73 virtual void TearDown() | 72 virtual void TearDown() |
74 { | 73 { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 108 |
110 layerElement = document->getElementById("layer-solid-color"); | 109 layerElement = document->getElementById("layer-solid-color"); |
111 renderer = toRenderLayerModelObject(layerElement->renderer()); | 110 renderer = toRenderLayerModelObject(layerElement->renderer()); |
112 // CompositedLayerMapping::graphicsLayer's background color is unset if Soli
dColorLayer is created. | 111 // CompositedLayerMapping::graphicsLayer's background color is unset if Soli
dColorLayer is created. |
113 EXPECT_EQ(Color(), renderer->layer()->compositedLayerMapping()->mainGraphics
Layer()->backgroundColor()); | 112 EXPECT_EQ(Color(), renderer->layer()->compositedLayerMapping()->mainGraphics
Layer()->backgroundColor()); |
114 } | 113 } |
115 | 114 |
116 } | 115 } |
117 | 116 |
118 } // namespace WebCore | 117 } // namespace WebCore |
OLD | NEW |