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

Side by Side Diff: cc/scheduler/begin_frame_source_unittest.cc

Issue 634243003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr [part-4] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formating fix. Created 6 years, 2 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 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 <deque> 5 #include <deque>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 FakeBeginFrameSource* source2_; 569 FakeBeginFrameSource* source2_;
570 FakeBeginFrameSource* source3_; 570 FakeBeginFrameSource* source3_;
571 571
572 private: 572 private:
573 scoped_ptr<FakeBeginFrameSource> source1_store_; 573 scoped_ptr<FakeBeginFrameSource> source1_store_;
574 scoped_ptr<FakeBeginFrameSource> source2_store_; 574 scoped_ptr<FakeBeginFrameSource> source2_store_;
575 scoped_ptr<FakeBeginFrameSource> source3_store_; 575 scoped_ptr<FakeBeginFrameSource> source3_store_;
576 }; 576 };
577 577
578 TEST_F(BeginFrameSourceMultiplexerTest, SourcesManipulation) { 578 TEST_F(BeginFrameSourceMultiplexerTest, SourcesManipulation) {
579 EXPECT_EQ(NULL, mux_->ActiveSource()); 579 EXPECT_EQ(nullptr, mux_->ActiveSource());
580 580
581 mux_->AddSource(source1_); 581 mux_->AddSource(source1_);
582 EXPECT_EQ(source1_, mux_->ActiveSource()); 582 EXPECT_EQ(source1_, mux_->ActiveSource());
583 583
584 mux_->SetActiveSource(NULL); 584 mux_->SetActiveSource(nullptr);
585 EXPECT_EQ(NULL, mux_->ActiveSource()); 585 EXPECT_EQ(nullptr, mux_->ActiveSource());
586 586
587 mux_->SetActiveSource(source1_); 587 mux_->SetActiveSource(source1_);
588 588
589 #ifndef NDEBUG 589 #ifndef NDEBUG
590 // Setting a source which isn't in the mux as active should DCHECK fail. 590 // Setting a source which isn't in the mux as active should DCHECK fail.
591 EXPECT_DEATH({ mux_->SetActiveSource(source2_); }, ""); 591 EXPECT_DEATH({ mux_->SetActiveSource(source2_); }, "");
592 592
593 // Adding a source which is already added should DCHECK fail. 593 // Adding a source which is already added should DCHECK fail.
594 EXPECT_DEATH({ mux_->AddSource(source1_); }, ""); 594 EXPECT_DEATH({ mux_->AddSource(source1_); }, "");
595 595
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 mux_->SetActiveSource(source2_); 738 mux_->SetActiveSource(source2_);
739 SEND_BEGIN_FRAME_DROP(*source2_, 750, 1050, 300); 739 SEND_BEGIN_FRAME_DROP(*source2_, 750, 1050, 300);
740 SEND_BEGIN_FRAME_USED(*source2_, 1050, 1250, 300); 740 SEND_BEGIN_FRAME_USED(*source2_, 1050, 1250, 300);
741 741
742 mux_->SetActiveSource(source1_); 742 mux_->SetActiveSource(source1_);
743 SEND_BEGIN_FRAME_DROP(*source2_, 1100, 1400, 300); 743 SEND_BEGIN_FRAME_DROP(*source2_, 1100, 1400, 300);
744 } 744 }
745 745
746 } // namespace 746 } // namespace
747 } // namespace cc 747 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698