OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 ui_test_utils::BROWSER_TEST_NONE); | 25 ui_test_utils::BROWSER_TEST_NONE); |
26 chrome::SelectPreviousTab(browser); | 26 chrome::SelectPreviousTab(browser); |
27 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; | 27 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; |
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(); | |
36 InProcessBrowserTest::SetUpCommandLine(command_line); | |
37 | |
38 // GPU tests require gpu acceleration. | 35 // GPU tests require gpu acceleration. |
39 // We do not care which GL backend is used. | 36 // We do not care which GL backend is used. |
40 command_line->AppendSwitchASCII(switches::kUseGL, "any"); | 37 command_line->AppendSwitchASCII(switches::kUseGL, "any"); |
41 } | 38 } |
42 virtual void SetUpInProcessBrowserTestFixture() { | 39 virtual void SetUpInProcessBrowserTestFixture() { |
43 FilePath test_dir; | 40 FilePath test_dir; |
44 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); | 41 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); |
45 gpu_test_dir_ = test_dir.AppendASCII("gpu"); | 42 gpu_test_dir_ = test_dir.AppendASCII("gpu"); |
46 } | 43 } |
47 FilePath gpu_test_dir_; | 44 FilePath gpu_test_dir_; |
(...skipping 21 matching lines...) Expand all Loading... |
69 ui_test_utils::NavigateToURL( | 66 ui_test_utils::NavigateToURL( |
70 browser(), | 67 browser(), |
71 ui_test_utils::GetFileUrlWithQuery( | 68 ui_test_utils::GetFileUrlWithQuery( |
72 gpu_test_dir_.AppendASCII("webgl.html"), | 69 gpu_test_dir_.AppendASCII("webgl.html"), |
73 "query=WEBGL_lose_context")); | 70 "query=WEBGL_lose_context")); |
74 | 71 |
75 std::string m; | 72 std::string m; |
76 ASSERT_TRUE(message_queue.WaitForMessage(&m)); | 73 ASSERT_TRUE(message_queue.WaitForMessage(&m)); |
77 EXPECT_EQ("\"SUCCESS\"", m); | 74 EXPECT_EQ("\"SUCCESS\"", m); |
78 } | 75 } |
OLD | NEW |