Index: content/browser/gpu/compositor_util_browsertest.cc |
diff --git a/content/browser/gpu/compositor_util_browsertest.cc b/content/browser/gpu/compositor_util_browsertest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c628218e91019e890f7c56e28173c17806d05e9f |
--- /dev/null |
+++ b/content/browser/gpu/compositor_util_browsertest.cc |
@@ -0,0 +1,41 @@ |
+// Copyright (c) 2013 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 "content/public/browser/compositor_util.h" |
+#include "content/test/content_browser_test.h" |
+ |
+#if defined(OS_WIN) |
+#include "base/win/windows_version.h" |
+#endif |
+ |
+namespace content { |
+ |
+typedef ContentBrowserTest CompositorUtilTest; |
+ |
+// Test that threaded compositing and FCM are in the expected mode on the bots |
+// for all platforms. |
+IN_PROC_BROWSER_TEST_F(CompositorUtilTest, CompositingModeAsExpected) { |
gab
2013/08/06 18:47:07
Maybe this can be a unit test rather than a browse
|
+ enum CompositingMode { |
+ DISABLED, |
+ ENABLED, |
+ THREADED, |
+ } expected_mode = DISABLED; |
+#if defined(OS_CHROMEOS) |
+ expected_mode = THREADED; |
+#elif defined(OS_WIN) |
+#if defined(USE_AURA) |
+ // WinAura always uses threaded compositing. |
+ expected_mode = THREADED; |
+#else // defined(USE_AURA) |
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) |
gab
2013/08/09 14:17:03
Actually this won't work because the blacklist is
gab
2013/08/13 21:05:24
So, should we change the bots to use the blacklist
|
+ expected_mode = ENABLED; |
+#endif // defined(USE_AURA) |
+#endif |
+ |
+ EXPECT_EQ(expected_mode == ENABLED || expected_mode == THREADED, |
+ IsForceCompositingModeEnabled()); |
+ EXPECT_EQ(expected_mode == THREADED, IsThreadedCompositingEnabled()); |
+} |
+ |
+} |