OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ | 5 #ifndef CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ |
6 #define CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ | 6 #define CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This takes an input file of commands, which consist of a series of | 9 // This takes an input file of commands, which consist of a series of |
10 // actions, and runs every command, reporting the status of each one | 10 // actions, and runs every command, reporting the status of each one |
11 // to an output file once all the commands have been run. | 11 // to an output file once all the commands have been run. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // .txt file, not the actual crash dump. Although they do share | 346 // .txt file, not the actual crash dump. Although they do share |
347 // a common name. | 347 // a common name. |
348 FilePath GetMostRecentCrashDump(); | 348 FilePath GetMostRecentCrashDump(); |
349 | 349 |
350 // Returns true if the test has produced any new crash logs. | 350 // Returns true if the test has produced any new crash logs. |
351 // A "new" crash log is one that was produced since DidCrash was last called | 351 // A "new" crash log is one that was produced since DidCrash was last called |
352 // with |update_total_crashes| set to true. | 352 // with |update_total_crashes| set to true. |
353 bool DidCrash(bool update_total_crashes); | 353 bool DidCrash(bool update_total_crashes); |
354 | 354 |
355 // Override the message logging in AutomatedUITestBase. | 355 // Override the message logging in AutomatedUITestBase. |
356 virtual void LogErrorMessage(const std::string& error); | 356 virtual void LogErrorMessage(const std::string& error) OVERRIDE; |
357 virtual void LogWarningMessage(const std::string& warning); | 357 virtual void LogWarningMessage(const std::string& warning) OVERRIDE; |
358 virtual void LogInfoMessage(const std::string& info); | 358 virtual void LogInfoMessage(const std::string& info) OVERRIDE; |
359 | 359 |
360 // Overridden so that UI Test doesn't set up when the tests start. | 360 // Overridden so that UI Test doesn't set up when the tests start. |
361 // We use DoAction("SetUp") to set up, because it logs it and makes | 361 // We use DoAction("SetUp") to set up, because it logs it and makes |
362 // it easier to check for crashes when we start the browser. | 362 // it easier to check for crashes when we start the browser. |
363 virtual void SetUp() {} | 363 virtual void SetUp() OVERRIDE {} |
364 | 364 |
365 // Overridden so that UI Test doesn't close the browser (which is already | 365 // Overridden so that UI Test doesn't close the browser (which is already |
366 // closed) at the end of the test. | 366 // closed) at the end of the test. |
367 // We use DoAction("TearDown") to tear down, because it logs it and makes | 367 // We use DoAction("TearDown") to tear down, because it logs it and makes |
368 // it easier to check for crashes when we close the browser. | 368 // it easier to check for crashes when we close the browser. |
369 virtual void TearDown() {} | 369 virtual void TearDown() OVERRIDE {} |
370 | 370 |
371 private: | 371 private: |
372 // Parses the init file. | 372 // Parses the init file. |
373 XmlReader init_reader_; | 373 XmlReader init_reader_; |
374 | 374 |
375 // Builds the output file. | 375 // Builds the output file. |
376 XmlWriter xml_writer_; | 376 XmlWriter xml_writer_; |
377 | 377 |
378 // Time the test was started. Used to find crash dumps. | 378 // Time the test was started. Used to find crash dumps. |
379 base::Time test_start_time_; | 379 base::Time test_start_time_; |
(...skipping 10 matching lines...) Expand all Loading... |
390 // results. | 390 // results. |
391 bool debug_logging_enabled_; | 391 bool debug_logging_enabled_; |
392 | 392 |
393 // A delay in second we wait for after each action. Useful for debugging. | 393 // A delay in second we wait for after each action. Useful for debugging. |
394 int post_action_delay_; | 394 int post_action_delay_; |
395 | 395 |
396 DISALLOW_COPY_AND_ASSIGN(AutomatedUITest); | 396 DISALLOW_COPY_AND_ASSIGN(AutomatedUITest); |
397 }; | 397 }; |
398 | 398 |
399 #endif // CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ | 399 #endif // CHROME_TEST_RELIABILITY_AUTOMATED_UI_TESTS_H_ |
OLD | NEW |