| 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/confirm_infobar_delegate.h" | 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
| 10 #include "chrome/browser/infobars/infobar.h" | 10 #include "chrome/browser/infobars/infobar.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class WebGLInfoBarTest : public InProcessBrowserTest { | 53 class WebGLInfoBarTest : public InProcessBrowserTest { |
| 54 protected: | 54 protected: |
| 55 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 55 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 56 base::FilePath test_dir; | 56 base::FilePath test_dir; |
| 57 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); | 57 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); |
| 58 gpu_test_dir_ = test_dir.AppendASCII("gpu"); | 58 gpu_test_dir_ = test_dir.AppendASCII("gpu"); |
| 59 } | 59 } |
| 60 base::FilePath gpu_test_dir_; | 60 base::FilePath gpu_test_dir_; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, ContextLossRaisesInfoBar) { | 63 // This test is flaky on Mac. http://crbug.com/324555 |
| 64 #if defined(OS_MACOSX) |
| 65 #define MAYBE_ContextLossRaisesInfoBar DISABLED_ContextLossRaisesInfoBar |
| 66 #else |
| 67 #define MAYBE_ContextLossRaisesInfoBar ContextLossRaisesInfoBar |
| 68 #endif |
| 69 IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, MAYBE_ContextLossRaisesInfoBar) { |
| 70 #undef MAYBE_ContextLossRaisesInfoBard |
| 64 #if defined(OS_WIN) && defined(USE_ASH) | 71 #if defined(OS_WIN) && defined(USE_ASH) |
| 65 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 72 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 66 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 73 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| 67 return; | 74 return; |
| 68 #endif | 75 #endif |
| 69 | 76 |
| 70 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) | 77 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) |
| 71 return; | 78 return; |
| 72 | 79 |
| 73 // Load page and wait for it to load. | 80 // Load page and wait for it to load. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 86 SimulateGPUCrash(browser()); | 93 SimulateGPUCrash(browser()); |
| 87 infobar_added.Wait(); | 94 infobar_added.Wait(); |
| 88 EXPECT_EQ(1u, | 95 EXPECT_EQ(1u, |
| 89 InfoBarService::FromWebContents( | 96 InfoBarService::FromWebContents( |
| 90 browser()->tab_strip_model()->GetActiveWebContents())-> | 97 browser()->tab_strip_model()->GetActiveWebContents())-> |
| 91 infobar_count()); | 98 infobar_count()); |
| 92 } | 99 } |
| 93 | 100 |
| 94 // This test is flaky on Mac. http://crbug.com/324555 | 101 // This test is flaky on Mac. http://crbug.com/324555 |
| 95 #if defined(OS_MACOSX) | 102 #if defined(OS_MACOSX) |
| 96 #define MAYBE_ContextLossInfoBarReload FLAKY_ContextLossInfoBarReload | 103 #define MAYBE_ContextLossInfoBarReload DISABLED_ContextLossInfoBarReload |
| 97 #else | 104 #else |
| 98 #define MAYBE_ContextLossInfoBarReload ContextLossInfoBarReload | 105 #define MAYBE_ContextLossInfoBarReload ContextLossInfoBarReload |
| 99 #endif | 106 #endif |
| 100 IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, MAYBE_ContextLossInfoBarReload) { | 107 IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, MAYBE_ContextLossInfoBarReload) { |
| 101 #undef MAYBE_ContextLossInfoBarReload | 108 #undef MAYBE_ContextLossInfoBarReload |
| 102 #if defined(OS_WIN) && defined(USE_ASH) | 109 #if defined(OS_WIN) && defined(USE_ASH) |
| 103 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 110 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 104 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 111 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| 105 return; | 112 return; |
| 106 #endif | 113 #endif |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // The page should reload and another message sent to the | 149 // The page should reload and another message sent to the |
| 143 // DomAutomationController. | 150 // DomAutomationController. |
| 144 m.clear(); | 151 m.clear(); |
| 145 ASSERT_TRUE(message_queue.WaitForMessage(&m)); | 152 ASSERT_TRUE(message_queue.WaitForMessage(&m)); |
| 146 EXPECT_EQ("\"LOADED\"", m); | 153 EXPECT_EQ("\"LOADED\"", m); |
| 147 } | 154 } |
| 148 | 155 |
| 149 // There isn't any point in adding a test which calls Accept() on the | 156 // There isn't any point in adding a test which calls Accept() on the |
| 150 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and | 157 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and |
| 151 // there's no concrete event that could be observed in response. | 158 // there's no concrete event that could be observed in response. |
| OLD | NEW |