Commit 169094b5 authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Check windows version in vr_pixeltests

Though the vr_pixeltests were previously removed from Windows 7 bots,
this didn't remove them from all known Windows 7 bots nor new Windows 7
bots.

Given that VR is not supported on Windows 7, we don't need to run these
tests there, so simply skip them if we're not running on Windows 7.

Bug: 1106809
Change-Id: I65d74d4f4c02c25cb37b7488880f78f6dcb27fd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304097
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789601}
parent d03acd3d
...@@ -7,9 +7,18 @@ ...@@ -7,9 +7,18 @@
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace vr { namespace vr {
TEST(GlTestEnvironmentTest, InitializeAndCleanup) { TEST(GlTestEnvironmentTest, InitializeAndCleanup) {
#if defined(OS_WIN)
// VR is not supported on Windows 7.
if (base::win::GetVersion() <= base::win::Version::WIN7)
return;
#endif
GlTestEnvironment gl_test_environment(gfx::Size(100, 100)); GlTestEnvironment gl_test_environment(gfx::Size(100, 100));
EXPECT_NE(gl_test_environment.GetFrameBufferForTesting(), 0u); EXPECT_NE(gl_test_environment.GetFrameBufferForTesting(), 0u);
EXPECT_EQ(glGetError(), (GLenum)GL_NO_ERROR); EXPECT_EQ(glGetError(), (GLenum)GL_NO_ERROR);
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#include "components/omnibox/browser/vector_icons.h" #include "components/omnibox/browser/vector_icons.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace vr { namespace vr {
namespace { namespace {
...@@ -19,6 +23,11 @@ constexpr gfx::Transform kIdentity; ...@@ -19,6 +23,11 @@ constexpr gfx::Transform kIdentity;
} // namespace } // namespace
TEST_F(UiPixelTest, DrawVrBrowsingMode) { TEST_F(UiPixelTest, DrawVrBrowsingMode) {
#if defined(OS_WIN)
// VR is not supported on Windows 7.
if (base::win::GetVersion() <= base::win::Version::WIN7)
return;
#endif
// Set up scene. // Set up scene.
UiInitialState ui_initial_state; UiInitialState ui_initial_state;
ui_initial_state.in_web_vr = false; ui_initial_state.in_web_vr = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment