OLD | NEW |
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 "app/gfx/gl/gl_implementation.h" | |
6 #include "base/command_line.h" | 5 #include "base/command_line.h" |
7 #include "base/path_service.h" | 6 #include "base/path_service.h" |
8 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
11 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
13 #include "chrome/test/in_process_browser_test.h" | 12 #include "chrome/test/in_process_browser_test.h" |
14 #include "chrome/test/test_launcher_utils.h" | 13 #include "chrome/test/test_launcher_utils.h" |
15 #include "chrome/test/ui_test_utils.h" | 14 #include "chrome/test/ui_test_utils.h" |
16 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "ui/gfx/gl/gl_implementation.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 void SimulateGPUCrash(Browser* browser) { | 21 void SimulateGPUCrash(Browser* browser) { |
22 LOG(ERROR) << "SimulateGPUCrash, before NavigateToURLWithDisposition"; | 22 LOG(ERROR) << "SimulateGPUCrash, before NavigateToURLWithDisposition"; |
23 ui_test_utils::NavigateToURLWithDisposition(browser, | 23 ui_test_utils::NavigateToURLWithDisposition(browser, |
24 GURL(chrome::kAboutGpuCrashURL), NEW_FOREGROUND_TAB, | 24 GURL(chrome::kAboutGpuCrashURL), NEW_FOREGROUND_TAB, |
25 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 25 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
26 browser->CloseTab(); | 26 browser->CloseTab(); |
27 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; | 27 LOG(ERROR) << "SimulateGPUCrash, after CloseTab"; |
(...skipping 29 matching lines...) Expand all Loading... |
57 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL( | 57 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL( |
58 gpu_test_dir_.AppendASCII("webgl.html"))); | 58 gpu_test_dir_.AppendASCII("webgl.html"))); |
59 | 59 |
60 SimulateGPUCrash(browser()); | 60 SimulateGPUCrash(browser()); |
61 | 61 |
62 browser()->Reload(CURRENT_TAB); | 62 browser()->Reload(CURRENT_TAB); |
63 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); | 63 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); |
64 EXPECT_EQ(ASCIIToUTF16("SUCCESS"), | 64 EXPECT_EQ(ASCIIToUTF16("SUCCESS"), |
65 browser()->GetSelectedTabContents()->GetTitle().substr(0, 7)); | 65 browser()->GetSelectedTabContents()->GetTitle().substr(0, 7)); |
66 } | 66 } |
OLD | NEW |