| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/file_path.h" | |
| 6 | |
| 7 #include "app/app_switches.h" | |
| 8 #include "base/test/test_timeouts.h" | |
| 9 #include "chrome/common/chrome_switches.h" | |
| 10 #include "chrome/test/ui/npapi_test_helper.h" | |
| 11 #include "chrome/test/ui_test_utils.h" | |
| 12 | |
| 13 using npapi_test::kTestCompleteCookie; | |
| 14 using npapi_test::kTestCompleteSuccess; | |
| 15 | |
| 16 // Helper class pepper NPAPI tests. | |
| 17 class PepperTester : public NPAPITesterBase { | |
| 18 protected: | |
| 19 PepperTester() : NPAPITesterBase() {} | |
| 20 | |
| 21 virtual void SetUp() { | |
| 22 // TODO(alokp): Remove no-sandbox flag once gpu plugin can run in sandbox. | |
| 23 launch_arguments_.AppendSwitch(switches::kNoSandbox); | |
| 24 launch_arguments_.AppendSwitch(switches::kInternalPepper); | |
| 25 launch_arguments_.AppendSwitch(switches::kEnableGPUPlugin); | |
| 26 // Use Mesa software renderer so it can run on testbots without any | |
| 27 // graphics hardware. | |
| 28 launch_arguments_.AppendSwitchASCII(switches::kUseGL, "osmesa"); | |
| 29 NPAPITesterBase::SetUp(); | |
| 30 } | |
| 31 }; | |
| 32 | |
| 33 // Test that a pepper 3d plugin loads and renders. | |
| 34 // TODO(alokp): Enable the test after making sure it works on all platforms | |
| 35 // and buildbots have OpenGL support. | |
| 36 #if defined(OS_WIN) | |
| 37 // Marked as FAILS (46662): failing on buildbots but passes on trybots. | |
| 38 TEST_F(PepperTester, FAILS_Pepper3D) { | |
| 39 const FilePath dir(FILE_PATH_LITERAL("pepper")); | |
| 40 const FilePath file(FILE_PATH_LITERAL("pepper_3d.html")); | |
| 41 GURL url = ui_test_utils::GetTestUrl(dir, file); | |
| 42 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | |
| 43 WaitForFinish("pepper_3d", "1", url, | |
| 44 kTestCompleteCookie, kTestCompleteSuccess, | |
| 45 TestTimeouts::action_max_timeout_ms()); | |
| 46 } | |
| 47 #endif | |
| OLD | NEW |