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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 1468753002: Reland of Remove blink::WebLayerClient and WebGraphicsLayerDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not access members of m_contentsLayer Created 5 years 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
« no previous file with comments | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 scoped_ptr<NullLayerDelegate> default_layer_delegate_; 685 scoped_ptr<NullLayerDelegate> default_layer_delegate_;
686 686
687 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest); 687 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest);
688 }; 688 };
689 689
690 TEST_F(LayerWithNullDelegateTest, EscapedDebugNames) { 690 TEST_F(LayerWithNullDelegateTest, EscapedDebugNames) {
691 scoped_ptr<Layer> layer(CreateLayer(LAYER_NOT_DRAWN)); 691 scoped_ptr<Layer> layer(CreateLayer(LAYER_NOT_DRAWN));
692 std::string name = "\"\'\\/\b\f\n\r\t\n"; 692 std::string name = "\"\'\\/\b\f\n\r\t\n";
693 layer->set_name(name); 693 layer->set_name(name);
694 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info = 694 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info =
695 layer->TakeDebugInfo(); 695 layer->TakeDebugInfo(layer->cc_layer_for_testing());
696 EXPECT_TRUE(debug_info.get()); 696 EXPECT_TRUE(debug_info.get());
697 std::string json; 697 std::string json;
698 debug_info->AppendAsTraceFormat(&json); 698 debug_info->AppendAsTraceFormat(&json);
699 base::JSONReader json_reader; 699 base::JSONReader json_reader;
700 scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json)); 700 scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json));
701 EXPECT_TRUE(debug_info_value); 701 EXPECT_TRUE(debug_info_value);
702 EXPECT_TRUE(debug_info_value->IsType(base::Value::TYPE_DICTIONARY)); 702 EXPECT_TRUE(debug_info_value->IsType(base::Value::TYPE_DICTIONARY));
703 base::DictionaryValue* dictionary = 0; 703 base::DictionaryValue* dictionary = 0;
704 EXPECT_TRUE(debug_info_value->GetAsDictionary(&dictionary)); 704 EXPECT_TRUE(debug_info_value->GetAsDictionary(&dictionary));
705 std::string roundtrip; 705 std::string roundtrip;
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 root->SetOpacity(0.5f); 1873 root->SetOpacity(0.5f);
1874 WaitForSwap(); 1874 WaitForSwap();
1875 EXPECT_EQ(1u, animation_observer.animation_step_count()); 1875 EXPECT_EQ(1u, animation_observer.animation_step_count());
1876 1876
1877 EXPECT_FALSE(animation_observer.shutdown()); 1877 EXPECT_FALSE(animation_observer.shutdown());
1878 ResetCompositor(); 1878 ResetCompositor();
1879 EXPECT_TRUE(animation_observer.shutdown()); 1879 EXPECT_TRUE(animation_observer.shutdown());
1880 } 1880 }
1881 1881
1882 } // namespace ui 1882 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698