diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 12 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 3 |
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 |