#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
+#include "chrome/grit/theme_resources.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/infobars/core/confirm_infobar_delegate.h"
+#include "components/infobars/core/infobar.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/content_paths.h"
-#include "content/public/common/page_transition_types.h"
#include "content/public/test/browser_test_utils.h"
#include "gpu/config/gpu_test_config.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/page_transition_types.h"
#include "ui/gl/gl_implementation.h"
namespace {
chrome::NavigateParams params(
browser,
GURL(content::kChromeUIGpuCrashURL),
- static_cast<content::PageTransition>(
- content::PAGE_TRANSITION_TYPED |
- content::PAGE_TRANSITION_FROM_ADDRESS_BAR));
+ ui::PageTransitionFromInt(
+ ui::PAGE_TRANSITION_TYPED |
+ ui::PAGE_TRANSITION_FROM_ADDRESS_BAR));
params.disposition = NEW_BACKGROUND_TAB;
chrome::Navigate(¶ms);
}
} // namespace
-class WebGLInfobarTest : public InProcessBrowserTest {
+class WebGLInfoBarTest : public InProcessBrowserTest {
protected:
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
base::FilePath test_dir;
base::FilePath gpu_test_dir_;
};
-IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossRaisesInfobar) {
+// This test is flaky. http://crbug.com/324555
+IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, DISABLED_ContextLossRaisesInfoBar) {
+#undef MAYBE_ContextLossRaisesInfoBard
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
infobar_count());
}
-IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossInfobarReload) {
+// This test is flaky. http://crbug.com/324555
+IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, DISABLED_ContextLossInfoBarReload) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
ASSERT_EQ(1u, infobar_service->infobar_count());
- InfoBarDelegate* delegate = infobar_service->infobar_at(0);
- ASSERT_TRUE(delegate->AsThreeDAPIInfoBarDelegate());
+ infobars::InfoBarDelegate* delegate =
+ infobar_service->infobar_at(0)->delegate();
+ ASSERT_EQ(IDR_INFOBAR_3D_BLOCKED, delegate->GetIconID());
delegate->AsConfirmInfoBarDelegate()->Cancel();
// The page should reload and another message sent to the