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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private_unittest.cc

Issue 456513002: Add base:: qualification to some CommandLine references in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: imerge Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/gpu/gpu_data_manager_impl_private.h" 9 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
10 #include "content/public/browser/gpu_data_manager_observer.h" 10 #include "content/public/browser/gpu_data_manager_observer.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 EXPECT_TRUE(manager->GpuAccessAllowed(NULL)); 594 EXPECT_TRUE(manager->GpuAccessAllowed(NULL));
595 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); 595 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
596 EXPECT_TRUE(manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)); 596 EXPECT_TRUE(manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL));
597 } 597 }
598 #endif // OS_LINUX 598 #endif // OS_LINUX
599 599
600 TEST_F(GpuDataManagerImplPrivateTest, GpuDriverBugListSingle) { 600 TEST_F(GpuDataManagerImplPrivateTest, GpuDriverBugListSingle) {
601 ScopedGpuDataManagerImplPrivate manager; 601 ScopedGpuDataManagerImplPrivate manager;
602 manager->gpu_driver_bugs_.insert(5); 602 manager->gpu_driver_bugs_.insert(5);
603 603
604 CommandLine command_line(0, NULL); 604 base::CommandLine command_line(0, NULL);
605 manager->AppendGpuCommandLine(&command_line); 605 manager->AppendGpuCommandLine(&command_line);
606 606
607 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)); 607 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds));
608 std::string args = command_line.GetSwitchValueASCII( 608 std::string args = command_line.GetSwitchValueASCII(
609 switches::kGpuDriverBugWorkarounds); 609 switches::kGpuDriverBugWorkarounds);
610 EXPECT_STREQ("5", args.c_str()); 610 EXPECT_STREQ("5", args.c_str());
611 } 611 }
612 612
613 TEST_F(GpuDataManagerImplPrivateTest, GpuDriverBugListMultiple) { 613 TEST_F(GpuDataManagerImplPrivateTest, GpuDriverBugListMultiple) {
614 ScopedGpuDataManagerImplPrivate manager; 614 ScopedGpuDataManagerImplPrivate manager;
615 manager->gpu_driver_bugs_.insert(5); 615 manager->gpu_driver_bugs_.insert(5);
616 manager->gpu_driver_bugs_.insert(7); 616 manager->gpu_driver_bugs_.insert(7);
617 617
618 CommandLine command_line(0, NULL); 618 base::CommandLine command_line(0, NULL);
619 manager->AppendGpuCommandLine(&command_line); 619 manager->AppendGpuCommandLine(&command_line);
620 620
621 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)); 621 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds));
622 std::string args = command_line.GetSwitchValueASCII( 622 std::string args = command_line.GetSwitchValueASCII(
623 switches::kGpuDriverBugWorkarounds); 623 switches::kGpuDriverBugWorkarounds);
624 EXPECT_STREQ("5,7", args.c_str()); 624 EXPECT_STREQ("5,7", args.c_str());
625 } 625 }
626 626
627 TEST_F(GpuDataManagerImplPrivateTest, BlacklistAllFeatures) { 627 TEST_F(GpuDataManagerImplPrivateTest, BlacklistAllFeatures) {
628 ScopedGpuDataManagerImplPrivate manager; 628 ScopedGpuDataManagerImplPrivate manager;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1)); 735 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1));
736 { 736 {
737 base::RunLoop run_loop; 737 base::RunLoop run_loop;
738 run_loop.RunUntilIdle(); 738 run_loop.RunUntilIdle();
739 } 739 }
740 EXPECT_TRUE(observer.gpu_info_updated()); 740 EXPECT_TRUE(observer.gpu_info_updated());
741 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); 741 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
742 } 742 }
743 743
744 } // namespace content 744 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698