| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 class MockWebFrameClient : public WebFrameClient { | 69 class MockWebFrameClient : public WebFrameClient { |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 class CompositedLayerMappingTest : public testing::Test { | 72 class CompositedLayerMappingTest : public testing::Test { |
| 73 public: | 73 public: |
| 74 CompositedLayerMappingTest() | 74 CompositedLayerMappingTest() |
| 75 : m_baseURL("http://www.test.com/") | 75 : m_baseURL("http://www.test.com/") |
| 76 { | 76 { |
| 77 // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because t
he compositing | 77 // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because t
he compositing |
| 78 // settings need to be set before the page is loaded. | 78 // settings need to be set before the page is loaded. |
| 79 m_mainFrame = WebFrame::create(&m_mockWebFrameClient); | 79 m_mainFrame = WebLocalFrame::create(&m_mockWebFrameClient); |
| 80 m_webViewImpl = toWebViewImpl(WebView::create(&m_mockWebViewClient)); | 80 m_webViewImpl = toWebViewImpl(WebView::create(&m_mockWebViewClient)); |
| 81 m_webViewImpl->settings()->setForceCompositingMode(true); | 81 m_webViewImpl->settings()->setForceCompositingMode(true); |
| 82 m_webViewImpl->settings()->setAcceleratedCompositingEnabled(true); | 82 m_webViewImpl->settings()->setAcceleratedCompositingEnabled(true); |
| 83 m_webViewImpl->settings()->setAcceleratedCompositingForFixedPositionEnab
led(true); | 83 m_webViewImpl->settings()->setAcceleratedCompositingForFixedPositionEnab
led(true); |
| 84 m_webViewImpl->settings()->setAcceleratedCompositingForOverflowScrollEna
bled(true); | 84 m_webViewImpl->settings()->setAcceleratedCompositingForOverflowScrollEna
bled(true); |
| 85 m_webViewImpl->settings()->setAcceleratedCompositingForScrollableFramesE
nabled(true); | 85 m_webViewImpl->settings()->setAcceleratedCompositingForScrollableFramesE
nabled(true); |
| 86 m_webViewImpl->settings()->setCompositedScrollingForFramesEnabled(true); | 86 m_webViewImpl->settings()->setCompositedScrollingForFramesEnabled(true); |
| 87 m_webViewImpl->setMainFrame(m_mainFrame); | 87 m_webViewImpl->setMainFrame(m_mainFrame); |
| 88 m_webViewImpl->resize(IntSize(320, 240)); | 88 m_webViewImpl->resize(IntSize(320, 240)); |
| 89 } | 89 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 layerElement = document->getElementById("layer-solid-color"); | 129 layerElement = document->getElementById("layer-solid-color"); |
| 130 renderer = toRenderLayerModelObject(layerElement->renderer()); | 130 renderer = toRenderLayerModelObject(layerElement->renderer()); |
| 131 // CompositedLayerMapping::graphicsLayer's background color is unset if Soli
dColorLayer is created. | 131 // CompositedLayerMapping::graphicsLayer's background color is unset if Soli
dColorLayer is created. |
| 132 EXPECT_EQ(Color(), renderer->layer()->compositedLayerMapping()->mainGraphics
Layer()->backgroundColor()); | 132 EXPECT_EQ(Color(), renderer->layer()->compositedLayerMapping()->mainGraphics
Layer()->backgroundColor()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace WebCore | 137 } // namespace WebCore |
| OLD | NEW |