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

Side by Side Diff: sky/tools/tester/test_runner.h

Issue 716043002: Implement event sender service for testing (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SKY_TOOLS_TESTER_TEST_RUNNER_H_ 5 #ifndef SKY_TOOLS_TESTER_TEST_RUNNER_H_
6 #define SKY_TOOLS_TESTER_TEST_RUNNER_H_ 6 #define SKY_TOOLS_TESTER_TEST_RUNNER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "sky/tools/tester/test_harness_impl.h" 9 #include "sky/tools/tester/test_harness_impl.h"
10 10
(...skipping 13 matching lines...) Expand all
24 virtual ~TestRunnerClient(); 24 virtual ~TestRunnerClient();
25 }; 25 };
26 26
27 class TestRunner { 27 class TestRunner {
28 public: 28 public:
29 TestRunner(TestRunnerClient* client, mojo::View* container, 29 TestRunner(TestRunnerClient* client, mojo::View* container,
30 const std::string& url); 30 const std::string& url);
31 virtual ~TestRunner(); 31 virtual ~TestRunner();
32 32
33 TestRunnerClient* client() const { return client_; } 33 TestRunnerClient* client() const { return client_; }
34 TestHarnessFactory* test_harness_factory() { return &test_harness_factory_; }
34 35
35 base::WeakPtr<TestRunner> GetWeakPtr(); 36 base::WeakPtr<TestRunner> GetWeakPtr();
36 void OnTestStart(); 37 void OnTestStart();
37 void OnTestComplete(const std::string& test_result); 38 void OnTestComplete(const std::string& test_result);
38 39
39 private: 40 private:
40 TestHarnessFactory test_harness_factory_; 41 TestHarnessFactory test_harness_factory_;
41 TestRunnerClient* client_; 42 TestRunnerClient* client_;
42 base::WeakPtrFactory<TestRunner> weak_ptr_factory_; 43 base::WeakPtrFactory<TestRunner> weak_ptr_factory_;
43 44
44 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRunner); 45 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRunner);
45 }; 46 };
46 47
47 } // namespace tester 48 } // namespace tester
48 } // namespace sky 49 } // namespace sky
49 50
50 #endif // SKY_TOOLS_TESTER_TEST_RUNNER_H_ 51 #endif // SKY_TOOLS_TESTER_TEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698