summaryrefslogtreecommitdiffstats
path: root/chrome/test/gpu
diff options
context:
space:
mode:
authorcmp@chromium.org <cmp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 23:32:06 +0000
committercmp@chromium.org <cmp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 23:32:06 +0000
commit2d2dfc6c97e63b09d8c13177393d7e98a49847fd (patch)
treeb2692ead233cce4bb63ca6d9fb76215202da6415 /chrome/test/gpu
parenta738cb179ea4f49083478316f5274c0a6accffd7 (diff)
downloadchromium_src-2d2dfc6c97e63b09d8c13177393d7e98a49847fd.zip
chromium_src-2d2dfc6c97e63b09d8c13177393d7e98a49847fd.tar.gz
chromium_src-2d2dfc6c97e63b09d8c13177393d7e98a49847fd.tar.bz2
Revert 79194 - Added GPUCrashTest.
BUG=none TEST=set kGpuMaxCrashCount to zero and verified the test fails Review URL: http://codereview.chromium.org/6705008 TBR=amarinichev@chromium.org Review URL: http://codereview.chromium.org/6730014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/gpu')
-rw-r--r--chrome/test/gpu/gpu_crash.cc64
1 files changed, 0 insertions, 64 deletions
diff --git a/chrome/test/gpu/gpu_crash.cc b/chrome/test/gpu/gpu_crash.cc
deleted file mode 100644
index e998142..0000000
--- a/chrome/test/gpu/gpu_crash.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "app/gfx/gl/gl_implementation.h"
-#include "base/path_service.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/common/url_constants.h"
-#include "chrome/test/in_process_browser_test.h"
-#include "chrome/test/test_launcher_utils.h"
-#include "chrome/test/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-void SimulateGPUCrash(Browser* browser) {
- LOG(ERROR) << "SimulateGPUCrash, before NavigateToURLWithDisposition";
- ui_test_utils::NavigateToURLWithDisposition(browser,
- GURL(chrome::kAboutGpuCrashURL), NEW_FOREGROUND_TAB,
- ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
- browser->CloseTab();
- LOG(ERROR) << "SimulateGPUCrash, after CloseTab";
-}
-
-} // namespace
-
-class GPUCrashTest : public InProcessBrowserTest {
- protected:
- virtual void SetUpCommandLine(CommandLine* command_line) {
- InProcessBrowserTest::SetUpCommandLine(command_line);
-
- // OverrideGLImplementation and kDisableAcceleratedCompositing for
- // OS_MACOSX are Taken verbatim from gpu_pixel_browsertest.cc and
- // gpu_browsertest.cc.
- EXPECT_TRUE(test_launcher_utils::OverrideGLImplementation(
- command_line,
- gfx::kGLImplementationOSMesaName));
-#if defined(OS_MACOSX)
- // Accelerated compositing does not work with OSMesa. AcceleratedSurface
- // assumes GL contexts are native.
- command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
-#endif
- }
-};
-
-IN_PROC_BROWSER_TEST_F(GPUCrashTest, Reload) {
- FilePath test_dir;
- ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
- FilePath gpu_test_dir_;
- gpu_test_dir_ = test_dir.AppendASCII("gpu");
-
- ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(
- gpu_test_dir_.AppendASCII("webgl.html")));
-
- SimulateGPUCrash(browser());
-
- browser()->Reload(CURRENT_TAB);
- ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
- EXPECT_EQ(ASCIIToUTF16("SUCCESS"),
- browser()->GetSelectedTabContents()->GetTitle().substr(0, 7));
-}