Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: cc/base/filter_operations_unittest.cc

Issue 2975033002: [tracing] Optimize TracedValue::AppendAsTraceFormat(). (Closed)
Patch Set: Fix GraphicsMemoryDumpProviderTest Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "cc/base/filter_operations.h" 7 #include "cc/base/filter_operations.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/skia/include/effects/SkBlurImageFilter.h" 9 #include "third_party/skia/include/effects/SkBlurImageFilter.h"
10 #include "third_party/skia/include/effects/SkDropShadowImageFilter.h" 10 #include "third_party/skia/include/effects/SkDropShadowImageFilter.h"
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 blended = to.Blend(from, 1.5); 963 blended = to.Blend(from, 1.5);
964 EXPECT_EQ(to, blended); 964 EXPECT_EQ(to, blended);
965 } 965 }
966 966
967 TEST(FilterOperationsTest, ToString) { 967 TEST(FilterOperationsTest, ToString) {
968 FilterOperations filters; 968 FilterOperations filters;
969 EXPECT_EQ(std::string("{\"FilterOperations\":[]}"), filters.ToString()); 969 EXPECT_EQ(std::string("{\"FilterOperations\":[]}"), filters.ToString());
970 970
971 filters.Append(FilterOperation::CreateSaturateFilter(3.f)); 971 filters.Append(FilterOperation::CreateSaturateFilter(3.f));
972 filters.Append(FilterOperation::CreateBlurFilter(2.f)); 972 filters.Append(FilterOperation::CreateBlurFilter(2.f));
973 EXPECT_EQ(std::string("{\"FilterOperations\":[{\"amount\":3.0,\"type\":2}," 973 EXPECT_EQ(std::string("{\"FilterOperations\":[{\"type\":2,\"amount\":3.0},"
974 "{\"amount\":2.0,\"type\":8}]}"), 974 "{\"type\":8,\"amount\":2.0}]}"),
975 filters.ToString()); 975 filters.ToString());
976 } 976 }
977 977
978 } // namespace 978 } // namespace
979 } // namespace cc 979 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698