Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) { ASSERT_NOT_REACHED(); } | 131 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) { ASSERT_NOT_REACHED(); } |
| 132 private: | 132 private: |
| 133 WebCompositorSupportMock** m_compositor; | 133 WebCompositorSupportMock** m_compositor; |
| 134 blink::WebCompositorSupport* compositorSupport() OVERRIDE { return *m_co mpositor; } | 134 blink::WebCompositorSupport* compositorSupport() OVERRIDE { return *m_co mpositor; } |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 WebCompositorSupportMock* m_mockCompositor; | 137 WebCompositorSupportMock* m_mockCompositor; |
| 138 PlatformProxy m_proxyPlatform; | 138 PlatformProxy m_proxyPlatform; |
| 139 | 139 |
| 140 protected: | 140 protected: |
| 141 bool m_enabled; | |
| 142 blink::Platform* m_platform; | 141 blink::Platform* m_platform; |
| 143 | 142 |
| 144 virtual void SetUp() | 143 virtual void SetUp() |
| 145 { | 144 { |
| 146 m_enabled = RuntimeEnabledFeatures::webAnimationsEnabled(); | |
| 147 // Needed for ChainedTimingFunction support | |
| 148 RuntimeEnabledFeatures::setWebAnimationsEnabled(true); | |
|
Steve Block
2013/11/26 05:37:22
Why is this no longer required? The ChainedTimingF
dstockwell
2013/11/26 05:59:25
It asserts that WebAnimationsCSS is enabled. I ass
| |
| 149 | |
| 150 m_mockCompositor = 0; | 145 m_mockCompositor = 0; |
| 151 m_platform = blink::Platform::current(); | 146 m_platform = blink::Platform::current(); |
| 152 blink::Platform::initialize(&m_proxyPlatform); | 147 blink::Platform::initialize(&m_proxyPlatform); |
| 153 } | 148 } |
| 154 | 149 |
| 155 virtual void TearDown() | 150 virtual void TearDown() |
| 156 { | 151 { |
| 157 RuntimeEnabledFeatures::setWebAnimationsEnabled(m_enabled); | |
| 158 blink::Platform::initialize(m_platform); | 152 blink::Platform::initialize(m_platform); |
| 159 } | 153 } |
| 160 | 154 |
| 161 void setCompositorForTesting(WebCompositorSupportMock& mock) | 155 void setCompositorForTesting(WebCompositorSupportMock& mock) |
| 162 { | 156 { |
| 163 ASSERT(!m_mockCompositor); | 157 ASSERT(!m_mockCompositor); |
| 164 m_mockCompositor = &mock; | 158 m_mockCompositor = &mock; |
| 165 } | 159 } |
| 166 }; | 160 }; |
| 167 | 161 |
| 168 } | 162 } |
| 169 | 163 |
| 170 #endif | 164 #endif |
| OLD | NEW |