| 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/test/ui/npapi_test_helper.h" | 9 #include "chrome/test/ui/npapi_test_helper.h" |
| 10 #include "chrome/test/ui_test_utils.h" | 10 #include "chrome/test/ui_test_utils.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 protected: | 25 protected: |
| 26 PepperTester() : NPAPITesterBase(kPepperTestPluginName) {} | 26 PepperTester() : NPAPITesterBase(kPepperTestPluginName) {} |
| 27 | 27 |
| 28 virtual void SetUp() { | 28 virtual void SetUp() { |
| 29 // TODO(alokp): Remove no-sandbox flag once gpu plugin can run in sandbox. | 29 // TODO(alokp): Remove no-sandbox flag once gpu plugin can run in sandbox. |
| 30 launch_arguments_.AppendSwitch(switches::kNoSandbox); | 30 launch_arguments_.AppendSwitch(switches::kNoSandbox); |
| 31 launch_arguments_.AppendSwitch(switches::kInternalPepper); | 31 launch_arguments_.AppendSwitch(switches::kInternalPepper); |
| 32 launch_arguments_.AppendSwitch(switches::kEnableGPUPlugin); | 32 launch_arguments_.AppendSwitch(switches::kEnableGPUPlugin); |
| 33 // Use Mesa software renderer so it can run on testbots without any | 33 // Use Mesa software renderer so it can run on testbots without any |
| 34 // graphics hardware. | 34 // graphics hardware. |
| 35 launch_arguments_.AppendSwitchWithValue(switches::kUseGL, "osmesa"); | 35 launch_arguments_.AppendSwitchASCII(switches::kUseGL, "osmesa"); |
| 36 NPAPITesterBase::SetUp(); | 36 NPAPITesterBase::SetUp(); |
| 37 } | 37 } |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 // Test that a pepper 3d plugin loads and renders. | 40 // Test that a pepper 3d plugin loads and renders. |
| 41 // TODO(alokp): Enable the test after making sure it works on all platforms | 41 // TODO(alokp): Enable the test after making sure it works on all platforms |
| 42 // and buildbots have OpenGL support. | 42 // and buildbots have OpenGL support. |
| 43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 44 // Marked as FAILS (46662): failing on buildbots but passes on trybots. | 44 // Marked as FAILS (46662): failing on buildbots but passes on trybots. |
| 45 TEST_F(PepperTester, FAILS_Pepper3D) { | 45 TEST_F(PepperTester, FAILS_Pepper3D) { |
| 46 const FilePath dir(FILE_PATH_LITERAL("pepper")); | 46 const FilePath dir(FILE_PATH_LITERAL("pepper")); |
| 47 const FilePath file(FILE_PATH_LITERAL("pepper_3d.html")); | 47 const FilePath file(FILE_PATH_LITERAL("pepper_3d.html")); |
| 48 GURL url = ui_test_utils::GetTestUrl(dir, file); | 48 GURL url = ui_test_utils::GetTestUrl(dir, file); |
| 49 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 49 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 50 WaitForFinish("pepper_3d", "1", url, | 50 WaitForFinish("pepper_3d", "1", url, |
| 51 kTestCompleteCookie, kTestCompleteSuccess, | 51 kTestCompleteCookie, kTestCompleteSuccess, |
| 52 action_max_timeout_ms()); | 52 action_max_timeout_ms()); |
| 53 } | 53 } |
| 54 #endif | 54 #endif |
| OLD | NEW |