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

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

Issue 868603007: Mechanical rename of base::debug -> base::trace_event [final pass]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3_1
Patch Set: Fixing win file. Created 5 years, 10 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
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/events/latency_info.cc » ('j') | 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 private: 639 private:
640 scoped_ptr<NullLayerDelegate> default_layer_delegate_; 640 scoped_ptr<NullLayerDelegate> default_layer_delegate_;
641 641
642 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest); 642 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest);
643 }; 643 };
644 644
645 TEST_F(LayerWithNullDelegateTest, EscapedDebugNames) { 645 TEST_F(LayerWithNullDelegateTest, EscapedDebugNames) {
646 scoped_ptr<Layer> layer(CreateLayer(LAYER_NOT_DRAWN)); 646 scoped_ptr<Layer> layer(CreateLayer(LAYER_NOT_DRAWN));
647 std::string name = "\"\'\\/\b\f\n\r\t\n"; 647 std::string name = "\"\'\\/\b\f\n\r\t\n";
648 layer->set_name(name); 648 layer->set_name(name);
649 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info = 649 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info =
650 layer->TakeDebugInfo(); 650 layer->TakeDebugInfo();
651 EXPECT_TRUE(!!debug_info.get()); 651 EXPECT_TRUE(!!debug_info.get());
652 std::string json; 652 std::string json;
653 debug_info->AppendAsTraceFormat(&json); 653 debug_info->AppendAsTraceFormat(&json);
654 base::JSONReader json_reader; 654 base::JSONReader json_reader;
655 scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json)); 655 scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json));
656 EXPECT_TRUE(!!debug_info_value); 656 EXPECT_TRUE(!!debug_info_value);
657 EXPECT_TRUE(debug_info_value->IsType(base::Value::TYPE_DICTIONARY)); 657 EXPECT_TRUE(debug_info_value->IsType(base::Value::TYPE_DICTIONARY));
658 base::DictionaryValue* dictionary = 0; 658 base::DictionaryValue* dictionary = 0;
659 EXPECT_TRUE(debug_info_value->GetAsDictionary(&dictionary)); 659 EXPECT_TRUE(debug_info_value->GetAsDictionary(&dictionary));
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 MakeFrameData(gfx::Size(10, 10)))); 1741 MakeFrameData(gfx::Size(10, 10))));
1742 layer->SetShowDelegatedContent(frame_provider.get(), gfx::Size(10, 10)); 1742 layer->SetShowDelegatedContent(frame_provider.get(), gfx::Size(10, 10));
1743 1743
1744 EXPECT_FALSE(delegate.delegated_frame_damage_called()); 1744 EXPECT_FALSE(delegate.delegated_frame_damage_called());
1745 layer->OnDelegatedFrameDamage(damage_rect); 1745 layer->OnDelegatedFrameDamage(damage_rect);
1746 EXPECT_TRUE(delegate.delegated_frame_damage_called()); 1746 EXPECT_TRUE(delegate.delegated_frame_damage_called());
1747 EXPECT_EQ(damage_rect, delegate.delegated_frame_damage_rect()); 1747 EXPECT_EQ(damage_rect, delegate.delegated_frame_damage_rect());
1748 } 1748 }
1749 1749
1750 } // namespace ui 1750 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698