| Index: chrome/test/gpu/gpu_crash_browsertest.cc
|
| diff --git a/chrome/test/gpu/gpu_crash_browsertest.cc b/chrome/test/gpu/gpu_crash_browsertest.cc
|
| index 94fa01b9719e803e85ba4952b7fd43394388f1d4..569be6690564a339c7bc3ae99dc40fcce97c57a1 100644
|
| --- a/chrome/test/gpu/gpu_crash_browsertest.cc
|
| +++ b/chrome/test/gpu/gpu_crash_browsertest.cc
|
| @@ -5,15 +5,19 @@
|
| #include "base/command_line.h"
|
| #include "base/path_service.h"
|
| #include "base/utf_string_conversions.h"
|
| +#include "chrome/browser/infobars/infobar_tab_helper.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_commands.h"
|
| #include "chrome/browser/ui/browser_navigator.h"
|
| +#include "chrome/browser/ui/browser_tabstrip.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| #include "chrome/test/base/test_launcher_utils.h"
|
| #include "chrome/test/base/ui_test_utils.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"
|
| @@ -60,6 +64,9 @@ class GPUCrashTest : public InProcessBrowserTest {
|
| IN_PROC_BROWSER_TEST_F(GPUCrashTest, Kill) {
|
| content::DOMMessageQueue message_queue;
|
|
|
| + content::GpuDataManager::GetInstance()->
|
| + DisableDomainBlockingFor3DAPIsForTesting();
|
| +
|
| // Load page and wait for it to load.
|
| content::WindowedNotificationObserver observer(
|
| content::NOTIFICATION_LOAD_STOP,
|
| @@ -77,6 +84,26 @@ IN_PROC_BROWSER_TEST_F(GPUCrashTest, Kill) {
|
| EXPECT_EQ("\"SUCCESS\"", m);
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(GPUCrashTest, ContextLossRaisesInfobar) {
|
| + // Load page and wait for it to load.
|
| + content::WindowedNotificationObserver observer(
|
| + content::NOTIFICATION_LOAD_STOP,
|
| + content::NotificationService::AllSources());
|
| + ui_test_utils::NavigateToURL(
|
| + browser(),
|
| + content::GetFileUrlWithQuery(
|
| + gpu_test_dir_.AppendASCII("webgl.html"), "query=kill"));
|
| + observer.Wait();
|
| +
|
| + content::WindowedNotificationObserver infobar_added(
|
| + chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
|
| + content::NotificationService::AllSources());
|
| + SimulateGPUCrash(browser());
|
| + infobar_added.Wait();
|
| + EXPECT_EQ(1u,
|
| + InfoBarTabHelper::FromWebContents(
|
| + chrome::GetActiveWebContents(browser()))->GetInfoBarCount());
|
| +}
|
|
|
| IN_PROC_BROWSER_TEST_F(GPUCrashTest, WebkitLoseContext) {
|
| content::DOMMessageQueue message_queue;
|
|
|