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

Unified Diff: sky/tools/tester/test_harness.cc

Issue 702603005: Add a sketch of a test_perf script (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: sky/tools/tester/test_harness.cc
diff --git a/sky/tools/tester/test_harness.cc b/sky/tools/tester/test_harness.cc
deleted file mode 100644
index 82d4fb9f16f0be9ff23bf4df1d5cae7b19e7886e..0000000000000000000000000000000000000000
--- a/sky/tools/tester/test_harness.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 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.
-
-#include "sky/tools/tester/test_harness.h"
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include <iostream>
-
-namespace sky {
-namespace tester {
-namespace {
-
-std::string WaitForURL() {
- std::string url;
- std::cin >> url;
- return url;
-}
-
-} // namespace
-
-TestHarness::TestHarness(mojo::View* container)
- : container_(container),
- weak_ptr_factory_(this) {
- std::cout << "#READY\n";
- std::cout.flush();
-}
-
-TestHarness::~TestHarness() {
-}
-
-void TestHarness::ScheduleRun() {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&TestHarness::Run, weak_ptr_factory_.GetWeakPtr()));
-}
-
-void TestHarness::Run() {
- DCHECK(!test_runner_);
- test_runner_.reset(new TestRunner(this, container_, WaitForURL()));
-}
-
-void TestHarness::OnTestComplete() {
- test_runner_.reset();
- ScheduleRun();
-}
-
-} // namespace tester
-} // namespace sky

Powered by Google App Engine
This is Rietveld 408576698