diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 10:25:12 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 10:25:12 +0000 |
commit | 3dd52d766cd0f08d77a3658c3383c64d4ff4c715 (patch) | |
tree | 4df989090eb2642077d9acbe723ea9a0fb0004b1 /chrome | |
parent | 56e0a6e587bebe79e32d662ae3d80dc29b639c59 (diff) | |
download | chromium_src-3dd52d766cd0f08d77a3658c3383c64d4ff4c715.zip chromium_src-3dd52d766cd0f08d77a3658c3383c64d4ff4c715.tar.gz chromium_src-3dd52d766cd0f08d77a3658c3383c64d4ff4c715.tar.bz2 |
Converting Toast crasher test from UI test to browser test.
The old UI test would just hang due to limitations in our test framework, but the browser test catches the crash that we currently have in our codebase (a crash due to recent refactoring).
BUG=45115
TEST=None, this is to add a new test for a disabled one.
Review URL: https://chromiumcodereview.appspot.com/9250010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc | 24 | ||||
-rw-r--r-- | chrome/browser/sanity_uitest.cc | 23 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 |
3 files changed, 26 insertions, 22 deletions
diff --git a/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc new file mode 100644 index 0000000..a9531521 --- /dev/null +++ b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc @@ -0,0 +1,24 @@ +// Copyright (c) 2012 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 "base/command_line.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/test/base/in_process_browser_test.h" + +// By passing kTryChromeAgain with a magic value > 10000 we cause Chrome +// to exit fairly early. +// Quickly exiting Chrome (regardless of this particular flag -- it +// doesn't do anything other than cause Chrome to quit on startup on +// non-Windows) was a cause of crashes (see bug 34799 for example) so +// this is a useful test of the startup/quick-shutdown cycle. +class TryChromeDialogBrowserTest : public InProcessBrowserTest { +public: + TryChromeDialogBrowserTest() {} + +protected: + virtual void SetUpCommandLine(CommandLine* command_line) { + command_line->AppendSwitchASCII(switches::kTryChromeAgain, "10001"); + } +}; +IN_PROC_BROWSER_TEST_F(TryChromeDialogBrowserTest, ToastCrasher) {} diff --git a/chrome/browser/sanity_uitest.cc b/chrome/browser/sanity_uitest.cc index 19e9a9c..e17e9c0 100644 --- a/chrome/browser/sanity_uitest.cc +++ b/chrome/browser/sanity_uitest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -53,24 +53,3 @@ TEST_F(ColumnLayout, MAYBE_Crash) { // UITest will check if this crashed. } - -// By passing kTryChromeAgain with a magic value > 10000 we cause Chrome -// to exit fairly early. -// Quickly exiting Chrome (regardless of this particular flag -- it -// doesn't do anything other than cause Chrome to quit on startup on -// non-Windows) was a cause of crashes (see bug 34799 for example) so -// this is a useful test of the startup/quick-shutdown cycle. -class EarlyReturnTest : public UITest { - public: - EarlyReturnTest() { - wait_for_initial_loads_ = false; // Don't wait for any pages to load. - launch_arguments_.AppendSwitchASCII(switches::kTryChromeAgain, "10001"); - } -}; - -// Disabled: http://crbug.com/45115 -// Due to limitations in our test infrastructure, this test currently doesn't -// work. -TEST_F(EarlyReturnTest, DISABLED_ToastCrasher) { - // UITest will check if this crashed. -} diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index d29a9a0..e640f4f 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -2659,6 +2659,7 @@ 'browser/extensions/webstore_inline_install_browsertest.cc', 'browser/extensions/window_open_apitest.cc', 'browser/first_run/first_run_browsertest.cc', + 'browser/first_run/try_chrome_dialog_view_browsertest.cc', 'browser/geolocation/access_token_store_browsertest.cc', 'browser/geolocation/geolocation_browsertest.cc', 'browser/history/history_browsertest.cc', |