Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: components/test_runner/test_info_extractor.h

Issue 1312693007: test_runner: Add TestInfoExtractor to get the list of test-urls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mandoline-layout-test-exp
Patch Set: . Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/test_runner/test_info_extractor.h
diff --git a/components/test_runner/test_info_extractor.h b/components/test_runner/test_info_extractor.h
new file mode 100644
index 0000000000000000000000000000000000000000..a34a37d26a7421027761a574b9f866cb013b85be
--- /dev/null
+++ b/components/test_runner/test_info_extractor.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_
+#define COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_
+
+#include <string>
+
+#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "components/test_runner/test_runner_export.h"
+#include "url/gurl.h"
+
+namespace test_runner {
+
+struct TEST_RUNNER_EXPORT TestInfo {
+ TestInfo(const GURL& url,
+ bool enable_pixel_dumping,
+ const std::string& expected_pixel_hash,
+ const base::FilePath& current_working_directory);
+ ~TestInfo();
+
+ GURL url;
+ bool enable_pixel_dumping;
+ std::string expected_pixel_hash;
+ base::FilePath current_working_directory;
+};
+
+class TEST_RUNNER_EXPORT TestInfoExtractor {
+ public:
+ explicit TestInfoExtractor(const base::CommandLine::StringVector& cmd_args);
+ ~TestInfoExtractor();
+
+ scoped_ptr<TestInfo> GetNextTest();
+
+ private:
+ base::CommandLine::StringVector cmdline_args_;
+ size_t cmdline_position_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestInfoExtractor);
+};
+
+} // namespace test_runner
+
+#endif // COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_

Powered by Google App Engine
This is Rietveld 408576698