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/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" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "chrome/test/base/test_launcher_utils.h" | 13 #include "chrome/test/base/test_launcher_utils.h" |
14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "ui/gfx/gl/gl_implementation.h" | 16 #include "ui/gl/gl_implementation.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 void SimulateGPUCrash(Browser* browser) { | 20 void SimulateGPUCrash(Browser* browser) { |
21 LOG(ERROR) << "SimulateGPUCrash, before NavigateToURLWithDisposition"; | 21 LOG(ERROR) << "SimulateGPUCrash, before NavigateToURLWithDisposition"; |
22 ui_test_utils::NavigateToURLWithDisposition(browser, | 22 ui_test_utils::NavigateToURLWithDisposition(browser, |
23 GURL(chrome::kChromeUIGpuCrashURL), NEW_FOREGROUND_TAB, | 23 GURL(chrome::kChromeUIGpuCrashURL), NEW_FOREGROUND_TAB, |
24 ui_test_utils::BROWSER_TEST_NONE); | 24 ui_test_utils::BROWSER_TEST_NONE); |
25 browser->SelectPreviousTab(); | 25 browser->SelectPreviousTab(); |
26 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; | 26 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 ui_test_utils::NavigateToURL( | 68 ui_test_utils::NavigateToURL( |
69 browser(), | 69 browser(), |
70 ui_test_utils::GetFileUrlWithQuery( | 70 ui_test_utils::GetFileUrlWithQuery( |
71 gpu_test_dir_.AppendASCII("webgl.html"), | 71 gpu_test_dir_.AppendASCII("webgl.html"), |
72 "query=WEBGL_lose_context")); | 72 "query=WEBGL_lose_context")); |
73 | 73 |
74 std::string m; | 74 std::string m; |
75 ASSERT_TRUE(message_queue.WaitForMessage(&m)); | 75 ASSERT_TRUE(message_queue.WaitForMessage(&m)); |
76 EXPECT_EQ("\"SUCCESS\"", m); | 76 EXPECT_EQ("\"SUCCESS\"", m); |
77 } | 77 } |
OLD | NEW |