| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 | 6 |
| 7 #include "cc/layer_impl.h" | 7 #include "cc/layer_impl.h" |
| 8 | 8 |
| 9 #include "cc/single_thread_proxy.h" | 9 #include "cc/single_thread_proxy.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "third_party/skia/include/effects/SkBlurImageFilter.h" | 12 #include "third_party/skia/include/effects/SkBlurImageFilter.h" |
| 13 #include <public/WebFilterOperation.h> | 13 #include <public/WebFilterOperation.h> |
| 14 #include <public/WebFilterOperations.h> | 14 #include <public/WebFilterOperations.h> |
| 15 | 15 |
| 16 using namespace cc; | |
| 17 using namespace WebKit; | 16 using namespace WebKit; |
| 18 | 17 |
| 18 namespace cc { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 #define EXECUTE_AND_VERIFY_SUBTREE_CHANGED(codeToTest) \ | 21 #define EXECUTE_AND_VERIFY_SUBTREE_CHANGED(codeToTest) \ |
| 22 root->resetAllChangeTrackingForSubtree(); \ | 22 root->resetAllChangeTrackingForSubtree(); \ |
| 23 codeToTest; \ | 23 codeToTest; \ |
| 24 EXPECT_TRUE(root->layerPropertyChanged()); \ | 24 EXPECT_TRUE(root->layerPropertyChanged()); \ |
| 25 EXPECT_TRUE(child->layerPropertyChanged()); \ | 25 EXPECT_TRUE(child->layerPropertyChanged()); \ |
| 26 EXPECT_TRUE(grandChild->layerPropertyChanged()); \ | 26 EXPECT_TRUE(grandChild->layerPropertyChanged()); \ |
| 27 EXPECT_FALSE(root->layerSurfacePropertyChanged()) | 27 EXPECT_FALSE(root->layerSurfacePropertyChanged()) |
| 28 | 28 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsScale(arbitraryNu
mber, arbitraryNumber)); | 155 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsScale(arbitraryNu
mber, arbitraryNumber)); |
| 156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true)); | 156 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setContentsOpaque(true)); |
| 157 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber))
; | 157 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setOpacity(arbitraryNumber))
; |
| 158 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderColor(arbitrar
yColor)); | 158 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderColor(arbitrar
yColor)); |
| 159 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderWidth(arbitrar
yNumber)); | 159 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDebugBorderWidth(arbitrar
yNumber)); |
| 160 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true)); | 160 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawsContent(true)); |
| 161 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra
ryTransform)); | 161 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setSublayerTransform(arbitra
ryTransform)); |
| 162 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize)); | 162 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setBounds(arbitrarySize)); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // anonymous namespace | 165 } // namespace |
| 166 } // namespace cc |
| OLD | NEW |