OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/test_runner/web_test_interfaces.h" | 5 #include "components/test_runner/web_test_interfaces.h" |
6 | 6 |
7 #include "components/test_runner/app_banner_client.h" | 7 #include "components/test_runner/app_banner_client.h" |
8 #include "components/test_runner/mock_web_audio_device.h" | 8 #include "components/test_runner/mock_web_audio_device.h" |
9 #include "components/test_runner/mock_web_media_stream_center.h" | 9 #include "components/test_runner/mock_web_media_stream_center.h" |
10 #include "components/test_runner/mock_web_midi_accessor.h" | 10 #include "components/test_runner/mock_web_midi_accessor.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 void WebTestInterfaces::BindTo(WebFrame* frame) { | 33 void WebTestInterfaces::BindTo(WebFrame* frame) { |
34 interfaces_->BindTo(frame); | 34 interfaces_->BindTo(frame); |
35 } | 35 } |
36 | 36 |
37 void WebTestInterfaces::ResetAll() { | 37 void WebTestInterfaces::ResetAll() { |
38 interfaces_->ResetAll(); | 38 interfaces_->ResetAll(); |
39 } | 39 } |
40 | 40 |
41 void WebTestInterfaces::SetTestIsRunning(bool running) { | 41 void WebTestInterfaces::SetTestIsRunning(bool running) { |
42 interfaces_->SetTestIsRunning(running); | 42 interfaces_->SetTestIsRunning(running); |
| 43 if (!running && !termination_.is_null()) |
| 44 termination_.Run(); |
43 } | 45 } |
44 | 46 |
45 void WebTestInterfaces::ConfigureForTestWithURL(const WebURL& test_url, | 47 void WebTestInterfaces::ConfigureForTestWithURL(const WebURL& test_url, |
46 bool generate_pixels) { | 48 bool generate_pixels) { |
47 interfaces_->ConfigureForTestWithURL(test_url, generate_pixels); | 49 interfaces_->ConfigureForTestWithURL(test_url, generate_pixels); |
48 } | 50 } |
49 | 51 |
50 WebTestRunner* WebTestInterfaces::TestRunner() { | 52 WebTestRunner* WebTestInterfaces::TestRunner() { |
51 return interfaces_->GetTestRunner(); | 53 return interfaces_->GetTestRunner(); |
52 } | 54 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 scoped_ptr<AppBannerClient> client(new AppBannerClient); | 86 scoped_ptr<AppBannerClient> client(new AppBannerClient); |
85 interfaces_->SetAppBannerClient(client.get()); | 87 interfaces_->SetAppBannerClient(client.get()); |
86 return client.Pass(); | 88 return client.Pass(); |
87 } | 89 } |
88 | 90 |
89 AppBannerClient* WebTestInterfaces::GetAppBannerClient() { | 91 AppBannerClient* WebTestInterfaces::GetAppBannerClient() { |
90 return interfaces_->GetAppBannerClient(); | 92 return interfaces_->GetAppBannerClient(); |
91 } | 93 } |
92 | 94 |
93 } // namespace test_runner | 95 } // namespace test_runner |
OLD | NEW |