OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file provides reliablity test which runs under UI test framework. The | 5 // This file provides reliablity test which runs under UI test framework. The |
6 // test is intended to run within QEMU environment. | 6 // test is intended to run within QEMU environment. |
7 // | 7 // |
8 // Usage 1: reliability_test | 8 // Usage 1: reliability_test |
9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly | 9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly |
10 // used by buildbot, to verify reliability_test itself runs ok. | 10 // used by buildbot, to verify reliability_test itself runs ok. |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 EXPECT_EQ(true, metrics.browser_clean_exit); | 331 EXPECT_EQ(true, metrics.browser_clean_exit); |
332 EXPECT_EQ(1, metrics.browser_launch_count); | 332 EXPECT_EQ(1, metrics.browser_launch_count); |
333 // Both starting page and test_url_1 are loaded. | 333 // Both starting page and test_url_1 are loaded. |
334 EXPECT_EQ(2, metrics.page_load_count); | 334 EXPECT_EQ(2, metrics.page_load_count); |
335 EXPECT_EQ(0, metrics.browser_crash_count); | 335 EXPECT_EQ(0, metrics.browser_crash_count); |
336 EXPECT_EQ(0, metrics.renderer_crash_count); | 336 EXPECT_EQ(0, metrics.renderer_crash_count); |
337 EXPECT_EQ(0, metrics.plugin_crash_count); | 337 EXPECT_EQ(0, metrics.plugin_crash_count); |
338 | 338 |
339 // Go to "about:crash" | 339 // Go to "about:crash" |
340 NavigateToURLLogResult(GURL(crash_url), log_file, &metrics); | 340 NavigateToURLLogResult(GURL(crash_url), log_file, &metrics); |
341 // Page load crashed and test automation timed out. | |
342 EXPECT_EQ(NAVIGATION_TIME_OUT, metrics.result); | |
343 // Found a crash dump | 341 // Found a crash dump |
344 EXPECT_EQ(1, metrics.crash_dump_count) << kFailedNoCrashService; | 342 EXPECT_EQ(1, metrics.crash_dump_count) << kFailedNoCrashService; |
345 // Browser did not crash, and exited cleanly. | 343 // Browser did not crash, and exited cleanly. |
346 EXPECT_EQ(true, metrics.browser_clean_exit); | 344 EXPECT_EQ(true, metrics.browser_clean_exit); |
347 EXPECT_EQ(1, metrics.browser_launch_count); | 345 EXPECT_EQ(1, metrics.browser_launch_count); |
348 // Only starting page was loaded. | 346 // Only the renderer should have crashed. |
349 EXPECT_EQ(1, metrics.page_load_count); | |
350 EXPECT_EQ(0, metrics.browser_crash_count); | 347 EXPECT_EQ(0, metrics.browser_crash_count); |
351 // Renderer crashed. | |
352 EXPECT_EQ(1, metrics.renderer_crash_count); | 348 EXPECT_EQ(1, metrics.renderer_crash_count); |
353 EXPECT_EQ(0, metrics.plugin_crash_count); | 349 EXPECT_EQ(0, metrics.plugin_crash_count); |
354 | 350 |
355 NavigateToURLLogResult(test_url_2, log_file, &metrics); | 351 NavigateToURLLogResult(test_url_2, log_file, &metrics); |
356 // The data on previous crash should be cleared and we should get | 352 // The data on previous crash should be cleared and we should get |
357 // metrics for a successful page load. | 353 // metrics for a successful page load. |
358 EXPECT_EQ(NAVIGATION_SUCCESS, metrics.result); | 354 EXPECT_EQ(NAVIGATION_SUCCESS, metrics.result); |
359 EXPECT_EQ(0, metrics.crash_dump_count); | 355 EXPECT_EQ(0, metrics.crash_dump_count); |
360 EXPECT_EQ(true, metrics.browser_clean_exit); | 356 EXPECT_EQ(true, metrics.browser_clean_exit); |
361 EXPECT_EQ(1, metrics.browser_launch_count); | 357 EXPECT_EQ(1, metrics.browser_launch_count); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 681 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
686 v8_log_path = v8_command_line.GetSwitchValue(kV8LogFileSwitch); | 682 v8_log_path = v8_command_line.GetSwitchValue(kV8LogFileSwitch); |
687 if (!file_util::AbsolutePath(&v8_log_path)) { | 683 if (!file_util::AbsolutePath(&v8_log_path)) { |
688 v8_log_path.clear(); | 684 v8_log_path.clear(); |
689 } | 685 } |
690 } | 686 } |
691 } | 687 } |
692 } | 688 } |
693 } | 689 } |
694 } | 690 } |
OLD | NEW |