| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/test/ui/ui_test.h" | 8 #include "chrome/test/ui/ui_test.h" |
| 9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
| 10 | 10 |
| 11 class GPUUITest : public UITest { | 11 class GPUUITest : public UITest { |
| 12 protected: | 12 protected: |
| 13 GPUUITest() { | 13 GPUUITest() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 virtual void SetUp() { | 16 virtual void SetUp() { |
| 17 UITest::SetUp(); | 17 UITest::SetUp(); |
| 18 gpu_test_dir_ = test_data_directory_.AppendASCII("gpu"); | 18 gpu_test_dir_ = test_data_directory_.AppendASCII("gpu"); |
| 19 } | 19 } |
| 20 | 20 |
| 21 FilePath gpu_test_dir_; | 21 FilePath gpu_test_dir_; |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 // TODO(apatrick): OSMesa is flaky on Mac. http://crbug/61037 | 24 TEST_F(GPUUITest, UITestLaunchedWithOSMesa) { |
| 25 #if defined(OS_MACOSX) | |
| 26 #define MAYBE_UITestLaunchedWithOSMesa DISABLED_UITestLaunchedWithOSMesa | |
| 27 #else | |
| 28 #define MAYBE_UITestLaunchedWithOSMesa UITestLaunchedWithOSMesa | |
| 29 #endif | |
| 30 | |
| 31 TEST_F(GPUUITest, MAYBE_UITestLaunchedWithOSMesa) { | |
| 32 // Check the webgl test reports success and that the renderer was OSMesa. | 25 // Check the webgl test reports success and that the renderer was OSMesa. |
| 33 // We use OSMesa for tests in order to get consistent results across a | 26 // We use OSMesa for tests in order to get consistent results across a |
| 34 // variety of boxes. | 27 // variety of boxes. |
| 35 NavigateToURL( | 28 NavigateToURL( |
| 36 net::FilePathToFileURL(gpu_test_dir_.AppendASCII("webgl.html"))); | 29 net::FilePathToFileURL(gpu_test_dir_.AppendASCII("webgl.html"))); |
| 37 | 30 |
| 38 EXPECT_EQ(std::wstring(L"SUCCESS: Mesa OffScreen"), GetActiveTabTitle()); | 31 EXPECT_EQ(std::wstring(L"SUCCESS: Mesa OffScreen"), GetActiveTabTitle()); |
| 39 } | 32 } |
| OLD | NEW |