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

Unified Diff: chrome/common/gpu_feature_flags_unittest.cc

Issue 6672064: Move gpu_feature_flags from chrome\common to content\browser since it's only ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/gpu_feature_flags.cc ('k') | content/browser/gpu_blacklist.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gpu_feature_flags_unittest.cc
===================================================================
--- chrome/common/gpu_feature_flags_unittest.cc (revision 78449)
+++ chrome/common/gpu_feature_flags_unittest.cc (working copy)
@@ -1,54 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/gpu_feature_flags.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-TEST(GpuFeatureFlagsTest, GpuFeatureFlagsBasic) {
- // Test that by default all flags are set to false.
- GpuFeatureFlags flags;
- EXPECT_EQ(flags.flags(), 0u);
-
- // Test SetFlags().
- GpuFeatureFlags flags2;
- flags2.set_flags(GpuFeatureFlags::kGpuFeatureAcceleratedCompositing |
- GpuFeatureFlags::kGpuFeatureWebgl);
- EXPECT_EQ(flags2.flags(),
- static_cast<uint32>(
- GpuFeatureFlags::kGpuFeatureAcceleratedCompositing |
- GpuFeatureFlags::kGpuFeatureWebgl));
-
- // Test Combine() is basically OR operation per flag.
- flags.set_flags(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas);
- flags.Combine(flags2);
- EXPECT_EQ(flags.flags(),
- static_cast<uint32>(
- GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas |
- GpuFeatureFlags::kGpuFeatureAcceleratedCompositing |
- GpuFeatureFlags::kGpuFeatureWebgl));
-
- // Test the currently supported feature set.
- flags.set_flags(GpuFeatureFlags::kGpuFeatureAll);
- EXPECT_EQ(flags.flags(),
- static_cast<uint32>(
- GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas |
- GpuFeatureFlags::kGpuFeatureAcceleratedCompositing |
- GpuFeatureFlags::kGpuFeatureWebgl |
- GpuFeatureFlags::kGpuFeatureMultisampling));
-
- // Test StringToGpuFeatureType.
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("accelerated_2d_canvas"),
- GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas);
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("accelerated_compositing"),
- GpuFeatureFlags::kGpuFeatureAcceleratedCompositing);
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("webgl"),
- GpuFeatureFlags::kGpuFeatureWebgl);
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("multisampling"),
- GpuFeatureFlags::kGpuFeatureMultisampling);
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("all"),
- GpuFeatureFlags::kGpuFeatureAll);
- EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("xxx"),
- GpuFeatureFlags::kGpuFeatureUnknown);
-}
-
« no previous file with comments | « chrome/common/gpu_feature_flags.cc ('k') | content/browser/gpu_blacklist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698