| 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/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
| 12 #include "chrome/browser/ui/browser_navigator.h" | 12 #include "chrome/browser/ui/browser_navigator.h" |
| 13 #include "chrome/browser/ui/browser_navigator_params.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
| 18 #include "chrome/test/base/test_launcher_utils.h" | 19 #include "chrome/test/base/test_launcher_utils.h" |
| 19 #include "chrome/test/base/test_switches.h" | 20 #include "chrome/test/base/test_switches.h" |
| 20 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
| 21 #include "components/infobars/core/confirm_infobar_delegate.h" | 22 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 22 #include "components/infobars/core/infobar.h" | 23 #include "components/infobars/core/infobar.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 chrome::NavigateParams params( | 42 chrome::NavigateParams params( |
| 42 browser, | 43 browser, |
| 43 GURL(content::kChromeUIGpuCrashURL), | 44 GURL(content::kChromeUIGpuCrashURL), |
| 44 ui::PageTransitionFromInt( | 45 ui::PageTransitionFromInt( |
| 45 ui::PAGE_TRANSITION_TYPED | | 46 ui::PAGE_TRANSITION_TYPED | |
| 46 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); | 47 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); |
| 47 params.disposition = NEW_BACKGROUND_TAB; | 48 params.disposition = NEW_BACKGROUND_TAB; |
| 48 chrome::Navigate(¶ms); | 49 chrome::Navigate(¶ms); |
| 49 } | 50 } |
| 50 | 51 |
| 51 } // namespace | 52 } // namespace |
| 52 | 53 |
| 53 class WebGLInfoBarTest : public InProcessBrowserTest { | 54 class WebGLInfoBarTest : public InProcessBrowserTest { |
| 54 protected: | 55 protected: |
| 55 void SetUpInProcessBrowserTestFixture() override { | 56 void SetUpInProcessBrowserTestFixture() override { |
| 56 base::FilePath test_dir; | 57 base::FilePath test_dir; |
| 57 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); | 58 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); |
| 58 gpu_test_dir_ = test_dir.AppendASCII("gpu"); | 59 gpu_test_dir_ = test_dir.AppendASCII("gpu"); |
| 59 } | 60 } |
| 60 base::FilePath gpu_test_dir_; | 61 base::FilePath gpu_test_dir_; |
| 61 }; | 62 }; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // The page should reload and another message sent to the | 142 // The page should reload and another message sent to the |
| 142 // DomAutomationController. | 143 // DomAutomationController. |
| 143 m.clear(); | 144 m.clear(); |
| 144 ASSERT_TRUE(message_queue.WaitForMessage(&m)); | 145 ASSERT_TRUE(message_queue.WaitForMessage(&m)); |
| 145 EXPECT_EQ("\"LOADED\"", m); | 146 EXPECT_EQ("\"LOADED\"", m); |
| 146 } | 147 } |
| 147 | 148 |
| 148 // There isn't any point in adding a test which calls Accept() on the | 149 // There isn't any point in adding a test which calls Accept() on the |
| 149 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and | 150 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and |
| 150 // there's no concrete event that could be observed in response. | 151 // there's no concrete event that could be observed in response. |
| OLD | NEW |