OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/test/test_launcher.h" | 5 #include "content/test/test_launcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // The environment variable name for the test shard index. | 45 // The environment variable name for the test shard index. |
46 const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; | 46 const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; |
47 | 47 |
48 // The default output file for XML output. | 48 // The default output file for XML output. |
49 const FilePath::CharType kDefaultOutputFile[] = FILE_PATH_LITERAL( | 49 const FilePath::CharType kDefaultOutputFile[] = FILE_PATH_LITERAL( |
50 "test_detail.xml"); | 50 "test_detail.xml"); |
51 | 51 |
52 // Quit test execution after this number of tests has timed out. | 52 // Quit test execution after this number of tests has timed out. |
53 const int kMaxTimeouts = 5; // 45s timeout * (5 + 1) = 270s max run time. | 53 const int kMaxTimeouts = 5; // 45s timeout * (5 + 1) = 270s max run time. |
54 | 54 |
| 55 const char kEmptyTestName[] = "InProcessBrowserTest.Empty"; |
| 56 |
55 namespace { | 57 namespace { |
56 | 58 |
57 // An empty test (it starts up and shuts down the browser as part of its | 59 // An empty test (it starts up and shuts down the browser as part of its |
58 // setup and teardown) used to prefetch all of the browser code into memory. | 60 // setup and teardown) used to prefetch all of the browser code into memory. |
59 IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, Empty) { | 61 IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, Empty) { |
60 | 62 |
61 } // namespace | 63 } // namespace |
62 | 64 |
63 // Parses the environment variable var as an Int32. If it is unset, returns | 65 // Parses the environment variable var as an Int32. If it is unset, returns |
64 // default_val. If it is set, unsets it then converts it to Int32 before | 66 // default_val. If it is set, unsets it then converts it to Int32 before |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 " --single-process\n" | 551 " --single-process\n" |
550 " Same as above, and also runs Chrome in single-process mode.\n" | 552 " Same as above, and also runs Chrome in single-process mode.\n" |
551 " --help\n" | 553 " --help\n" |
552 " Shows this message.\n" | 554 " Shows this message.\n" |
553 " --gtest_help\n" | 555 " --gtest_help\n" |
554 " Shows the gtest help message.\n"); | 556 " Shows the gtest help message.\n"); |
555 } | 557 } |
556 | 558 |
557 } // namespace | 559 } // namespace |
558 | 560 |
559 const char kEmptyTestName[] = "InProcessBrowserTest.Empty"; | |
560 | |
561 const char kGTestFilterFlag[] = "gtest_filter"; | 561 const char kGTestFilterFlag[] = "gtest_filter"; |
562 const char kGTestHelpFlag[] = "gtest_help"; | 562 const char kGTestHelpFlag[] = "gtest_help"; |
563 const char kGTestListTestsFlag[] = "gtest_list_tests"; | 563 const char kGTestListTestsFlag[] = "gtest_list_tests"; |
564 const char kGTestRepeatFlag[] = "gtest_repeat"; | 564 const char kGTestRepeatFlag[] = "gtest_repeat"; |
565 const char kGTestRunDisabledTestsFlag[] = "gtest_also_run_disabled_tests"; | 565 const char kGTestRunDisabledTestsFlag[] = "gtest_also_run_disabled_tests"; |
566 const char kGTestOutputFlag[] = "gtest_output"; | 566 const char kGTestOutputFlag[] = "gtest_output"; |
567 | 567 |
568 const char kSingleProcessTestsFlag[] = "single_process"; | 568 const char kSingleProcessTestsFlag[] = "single_process"; |
569 const char kSingleProcessTestsAndChromeFlag[] = "single-process"; | 569 const char kSingleProcessTestsAndChromeFlag[] = "single-process"; |
570 // The following is kept for historical reasons (so people that are used to | 570 // The following is kept for historical reasons (so people that are used to |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 } | 662 } |
663 | 663 |
664 // Special value "-1" means "repeat indefinitely". | 664 // Special value "-1" means "repeat indefinitely". |
665 if (cycles != -1) | 665 if (cycles != -1) |
666 cycles--; | 666 cycles--; |
667 } | 667 } |
668 return exit_code; | 668 return exit_code; |
669 } | 669 } |
670 | 670 |
671 } // namespace test_launcher | 671 } // namespace test_launcher |
OLD | NEW |