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/api/infobars/confirm_infobar_delegate.h" | 8 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
9 #include "chrome/browser/api/infobars/infobar_service.h" | 9 #include "chrome/browser/api/infobars/infobar_service.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace { | 31 namespace { |
32 | 32 |
33 void SimulateGPUCrash(Browser* browser) { | 33 void SimulateGPUCrash(Browser* browser) { |
34 // None of the ui_test_utils entry points supports what we need to | 34 // None of the ui_test_utils entry points supports what we need to |
35 // do here: navigate with the PAGE_TRANSITION_FROM_ADDRESS_BAR flag, | 35 // do here: navigate with the PAGE_TRANSITION_FROM_ADDRESS_BAR flag, |
36 // without waiting for the navigation. It would be painful to change | 36 // without waiting for the navigation. It would be painful to change |
37 // either of the NavigateToURL entry points to support these two | 37 // either of the NavigateToURL entry points to support these two |
38 // constraints, so we use chrome::Navigate directly. | 38 // constraints, so we use chrome::Navigate directly. |
39 chrome::NavigateParams params( | 39 chrome::NavigateParams params( |
40 browser, | 40 browser, |
41 GURL(chrome::kChromeUIGpuCrashURL), | 41 GURL(content::kChromeUIGpuCrashURL), |
42 static_cast<content::PageTransition>( | 42 static_cast<content::PageTransition>( |
43 content::PAGE_TRANSITION_TYPED | | 43 content::PAGE_TRANSITION_TYPED | |
44 content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); | 44 content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); |
45 params.disposition = NEW_BACKGROUND_TAB; | 45 params.disposition = NEW_BACKGROUND_TAB; |
46 chrome::Navigate(¶ms); | 46 chrome::Navigate(¶ms); |
47 } | 47 } |
48 | 48 |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 class WebGLInfobarTest : public InProcessBrowserTest { | 51 class WebGLInfobarTest : public InProcessBrowserTest { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // The page should reload and another message sent to the | 132 // The page should reload and another message sent to the |
133 // DomAutomationController. | 133 // DomAutomationController. |
134 m = ""; | 134 m = ""; |
135 ASSERT_TRUE(message_queue.WaitForMessage(&m)); | 135 ASSERT_TRUE(message_queue.WaitForMessage(&m)); |
136 EXPECT_EQ("\"LOADED\"", m); | 136 EXPECT_EQ("\"LOADED\"", m); |
137 } | 137 } |
138 | 138 |
139 // There isn't any point in adding a test which calls Accept() on the | 139 // There isn't any point in adding a test which calls Accept() on the |
140 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and | 140 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and |
141 // there's no concrete event that could be observed in response. | 141 // there's no concrete event that could be observed in response. |
OLD | NEW |