summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 00:14:09 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 00:14:09 +0000
commit4d113254bf0c797148da120bfab92f86610f7aa1 (patch)
tree670b77be905201232f456153b5839cc7518cd356 /chrome/test
parentd6b1cd795ee22aa4460c1b30b8de74ecd7d33846 (diff)
downloadchromium_src-4d113254bf0c797148da120bfab92f86610f7aa1.zip
chromium_src-4d113254bf0c797148da120bfab92f86610f7aa1.tar.gz
chromium_src-4d113254bf0c797148da120bfab92f86610f7aa1.tar.bz2
Add a note about a test that's expected to fail if you're not running crash_service.exe.
Review URL: http://codereview.chromium.org/12882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/reliability/page_load_test.cc2
-rw-r--r--chrome/test/ui/ui_test.cc12
-rw-r--r--chrome/test/ui/ui_test.h3
3 files changed, 12 insertions, 5 deletions
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index e34f968..16b32b5 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -296,7 +296,7 @@ class PageLoadTest : public UITest {
// Page load crashed and test automation timed out.
EXPECT_EQ(NAVIGATION_TIME_OUT, metrics.result);
// Found a crash dump
- EXPECT_EQ(1, metrics.crash_dump_count);
+ EXPECT_EQ(1, metrics.crash_dump_count) << kFailedNoCrashService;
// Browser did not crash, and exited cleanly.
EXPECT_EQ(true, metrics.browser_clean_exit);
EXPECT_EQ(1, metrics.browser_launch_count);
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 319be79..415533e 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -32,6 +32,10 @@
using base::TimeTicks;
+const wchar_t UITest::kFailedNoCrashService[] =
+ L"NOTE: This test is expected to fail if crash_service.exe is not "
+ L"running. Start it manually before running this test (see the build "
+ L"output directory).";
bool UITest::in_process_renderer_ = false;
bool UITest::in_process_plugins_ = false;
bool UITest::no_sandbox_ = false;
@@ -119,10 +123,10 @@ void UITest::TearDown() {
file_util::CountFilesCreatedAfter(crash_dump_path, test_start_time_) / 2;
std::wstring error_msg =
L"Encountered an unexpected crash in the program during this test.";
- if (expected_crashes_ > 0 && actual_crashes == 0)
- error_msg += L" NOTE: This test is expected to fail if crash_service.exe "
- L"is not running. Start it manually before running this "
- L"test (see the build output directory).";
+ if (expected_crashes_ > 0 && actual_crashes == 0) {
+ error_msg += L" ";
+ error_msg += kFailedNoCrashService;
+ }
EXPECT_EQ(expected_crashes_, actual_crashes) << error_msg;
}
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 66a103c..5c1625a 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -37,6 +37,9 @@ class UITest : public testing::Test {
static const int kWaitForActionMaxMsec = 10000;
// Delay to let the browser complete the test.
static const int kMaxTestExecutionTime = 30000;
+ // String to display when a test fails because the crash service isn't
+ // running.
+ static const wchar_t kFailedNoCrashService[];
// Tries to delete the specified file/directory returning true on success.
// This differs from file_util::Delete in that it repeatedly invokes Delete