Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/gpu_crash_browsertest.cc

Issue 8347007: Used use-gl=any instead of forcing osmesa for gpu browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gpu_browsertest.cc ('k') | chrome/browser/gpu_pixel_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 class GPUCrashTest : public InProcessBrowserTest { 32 class GPUCrashTest : public InProcessBrowserTest {
33 protected: 33 protected:
34 virtual void SetUpCommandLine(CommandLine* command_line) { 34 virtual void SetUpCommandLine(CommandLine* command_line) {
35 EnableDOMAutomation(); 35 EnableDOMAutomation();
36 InProcessBrowserTest::SetUpCommandLine(command_line); 36 InProcessBrowserTest::SetUpCommandLine(command_line);
37 37
38 // OverrideGLImplementation and kDisableAcceleratedCompositing for 38 // GPU tests require gpu acceleration.
39 // OS_MACOSX are Taken verbatim from gpu_pixel_browsertest.cc and 39 // We do not care which GL backend is used.
40 // gpu_browsertest.cc. 40 command_line->AppendSwitchASCII(switches::kUseGL, "any");
41 EXPECT_TRUE(test_launcher_utils::OverrideGLImplementation(
42 command_line,
43 gfx::kGLImplementationOSMesaName));
44 #if defined(OS_MACOSX)
45 // Accelerated compositing does not work with OSMesa. AcceleratedSurface
46 // assumes GL contexts are native.
47 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
48 #endif
49 } 41 }
50 virtual void SetUpInProcessBrowserTestFixture() { 42 virtual void SetUpInProcessBrowserTestFixture() {
51 FilePath test_dir; 43 FilePath test_dir;
52 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); 44 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
53 gpu_test_dir_ = test_dir.AppendASCII("gpu"); 45 gpu_test_dir_ = test_dir.AppendASCII("gpu");
54 } 46 }
55 FilePath gpu_test_dir_; 47 FilePath gpu_test_dir_;
56 }; 48 };
57 49
58 50
(...skipping 18 matching lines...) Expand all
77 ui_test_utils::NavigateToURL( 69 ui_test_utils::NavigateToURL(
78 browser(), 70 browser(),
79 ui_test_utils::GetFileUrlWithQuery( 71 ui_test_utils::GetFileUrlWithQuery(
80 gpu_test_dir_.AppendASCII("webgl.html"), 72 gpu_test_dir_.AppendASCII("webgl.html"),
81 "query=WEBKIT_lose_context")); 73 "query=WEBKIT_lose_context"));
82 74
83 std::string m; 75 std::string m;
84 ASSERT_TRUE(message_queue.WaitForMessage(&m)); 76 ASSERT_TRUE(message_queue.WaitForMessage(&m));
85 EXPECT_EQ("\"SUCCESS\"", m); 77 EXPECT_EQ("\"SUCCESS\"", m);
86 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/gpu_browsertest.cc ('k') | chrome/browser/gpu_pixel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698