// Copyright 2011 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ #define CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ #include <stddef.h> #include "base/time/time.h" #include "chrome/browser/diagnostics/diagnostics_model.h" namespace base { class FilePath; } namespace diagnostics { // Test IDs used to look up string identifiers for tests. If you add an ID here, // you will also need to add corresponding strings to several things in the .cc // file. enum DiagnosticsTestId { … }; // Represents a single diagnostic test and encapsulates the common // functionality across platforms as well. // It also implements the TestInfo interface providing the storage // for the outcome of the test. // Specific tests need (minimally) only to: // 1- override ExecuteImpl() to implement the test. // 2- call RecordStopFailure() or RecordFailure() or RecordSuccess() // at the end of the test. // 3- Optionally call observer->OnProgress() if the test is long. // 4- Optionally call observer->OnSkipped() if the test cannot be run. class DiagnosticsTest : public DiagnosticsModel::TestInfo { … }; } // namespace diagnostics #endif // CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_