Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "components/test_runner/test_runner.h" | 5 #include "components/test_runner/test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3104 | 3104 |
| 3105 void TestRunnerForSpecificView::AddWebPageOverlay() { | 3105 void TestRunnerForSpecificView::AddWebPageOverlay() { |
| 3106 web_view()->setPageOverlayColor(SK_ColorCYAN); | 3106 web_view()->setPageOverlayColor(SK_ColorCYAN); |
| 3107 } | 3107 } |
| 3108 | 3108 |
| 3109 void TestRunnerForSpecificView::RemoveWebPageOverlay() { | 3109 void TestRunnerForSpecificView::RemoveWebPageOverlay() { |
| 3110 web_view()->setPageOverlayColor(SK_ColorTRANSPARENT); | 3110 web_view()->setPageOverlayColor(SK_ColorTRANSPARENT); |
| 3111 } | 3111 } |
| 3112 | 3112 |
| 3113 void TestRunnerForSpecificView::LayoutAndPaintAsync() { | 3113 void TestRunnerForSpecificView::LayoutAndPaintAsync() { |
| 3114 test_runner::LayoutAndPaintAsyncThen(web_view(), base::Closure()); | 3114 test_runner::LayoutAndPaintAsyncThen( |
| 3115 web_view()->mainFrame()->toWebLocalFrame()->frameWidget(), | |
|
dcheng
2016/05/03 09:27:13
I think TestRunnerForSpecificView should actually
Łukasz Anforowicz
2016/05/03 16:09:55
TestRunnerForSpecificView has some view-specific t
lfg
2016/05/03 21:19:43
I think option 1 is similar to how the TestRunnerF
| |
| 3116 base::Closure()); | |
| 3115 } | 3117 } |
| 3116 | 3118 |
| 3117 void TestRunnerForSpecificView::LayoutAndPaintAsyncThen( | 3119 void TestRunnerForSpecificView::LayoutAndPaintAsyncThen( |
| 3118 v8::Local<v8::Function> callback) { | 3120 v8::Local<v8::Function> callback) { |
| 3119 test_runner::LayoutAndPaintAsyncThen( | 3121 test_runner::LayoutAndPaintAsyncThen( |
| 3120 web_view(), CreateClosureThatPostsV8Callback(callback)); | 3122 web_view()->mainFrame()->toWebLocalFrame()->frameWidget(), |
| 3123 CreateClosureThatPostsV8Callback(callback)); | |
| 3121 } | 3124 } |
| 3122 | 3125 |
| 3123 void TestRunnerForSpecificView::GetManifestThen( | 3126 void TestRunnerForSpecificView::GetManifestThen( |
| 3124 v8::Local<v8::Function> callback) { | 3127 v8::Local<v8::Function> callback) { |
| 3125 v8::UniquePersistent<v8::Function> persistent_callback( | 3128 v8::UniquePersistent<v8::Function> persistent_callback( |
| 3126 blink::mainThreadIsolate(), callback); | 3129 blink::mainThreadIsolate(), callback); |
| 3127 | 3130 |
| 3128 delegate()->FetchManifest( | 3131 delegate()->FetchManifest( |
| 3129 web_view(), web_view()->mainFrame()->document().manifestURL(), | 3132 web_view(), web_view()->mainFrame()->document().manifestURL(), |
| 3130 base::Bind(&TestRunnerForSpecificView::GetManifestCallback, | 3133 base::Bind(&TestRunnerForSpecificView::GetManifestCallback, |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3377 | 3380 |
| 3378 blink::WebView* TestRunnerForSpecificView::web_view() { | 3381 blink::WebView* TestRunnerForSpecificView::web_view() { |
| 3379 return web_test_proxy_base_->web_view(); | 3382 return web_test_proxy_base_->web_view(); |
| 3380 } | 3383 } |
| 3381 | 3384 |
| 3382 WebTestDelegate* TestRunnerForSpecificView::delegate() { | 3385 WebTestDelegate* TestRunnerForSpecificView::delegate() { |
| 3383 return web_test_proxy_base_->delegate(); | 3386 return web_test_proxy_base_->delegate(); |
| 3384 } | 3387 } |
| 3385 | 3388 |
| 3386 } // namespace test_runner | 3389 } // namespace test_runner |
| OLD | NEW |