Commit 32deeda4 authored by miletus@chromium.org's avatar miletus@chromium.org

Fix the failed AssertionTest and CheckFalseTest for touch build

set the expected errors accordingly with touch build

BUG=
TEST=AssertionTest.* & CheckFalseTest.* pass on touch build


Review URL: http://codereview.chromium.org/7053019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86693 0039d316-1c4b-4281-b951-d872f2087c98
parent 303d1a2a
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -74,6 +74,14 @@ TEST_F(ChromeLoggingTest, EnvironmentLogFileName) { ...@@ -74,6 +74,14 @@ TEST_F(ChromeLoggingTest, EnvironmentLogFileName) {
#define EXPECTED_ASSERT_CRASHES 1 #define EXPECTED_ASSERT_CRASHES 1
#endif #endif
// Touch build will start an extra renderer process (the extension process)
// for the virtual keyboard.
#if defined(TOUCH_UI)
#define EXPECTED_ASSERT_ERRORS 2
#else
#define EXPECTED_ASSERT_ERRORS 1
#endif
#if !defined(NDEBUG) // We don't have assertions in release builds. #if !defined(NDEBUG) // We don't have assertions in release builds.
// Tests whether we correctly fail on browser assertions during tests. // Tests whether we correctly fail on browser assertions during tests.
class AssertionTest : public UITest { class AssertionTest : public UITest {
...@@ -103,7 +111,7 @@ TEST_F(AssertionTest, Assertion) { ...@@ -103,7 +111,7 @@ TEST_F(AssertionTest, Assertion) {
expected_errors_ = 0; expected_errors_ = 0;
expected_crashes_ = 0; expected_crashes_ = 0;
} else { } else {
expected_errors_ = 1; expected_errors_ = EXPECTED_ASSERT_ERRORS;
expected_crashes_ = EXPECTED_ASSERT_CRASHES; expected_crashes_ = EXPECTED_ASSERT_CRASHES;
} }
} }
...@@ -138,7 +146,7 @@ TEST_F(CheckFalseTest, CheckFails) { ...@@ -138,7 +146,7 @@ TEST_F(CheckFalseTest, CheckFails) {
expected_errors_ = 0; expected_errors_ = 0;
expected_crashes_ = 0; expected_crashes_ = 0;
} else { } else {
expected_errors_ = 1; expected_errors_ = EXPECTED_ASSERT_ERRORS;
expected_crashes_ = EXPECTED_ASSERT_CRASHES; expected_crashes_ = EXPECTED_ASSERT_CRASHES;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment