Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_for_specific_view.h" | 5 #include "components/test_runner/test_runner_for_specific_view.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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 552 } | 552 } |
| 553 | 553 |
| 554 void TestRunnerForSpecificView::DidLosePointerLockInternal() { | 554 void TestRunnerForSpecificView::DidLosePointerLockInternal() { |
| 555 bool was_locked = pointer_locked_; | 555 bool was_locked = pointer_locked_; |
| 556 pointer_locked_ = false; | 556 pointer_locked_ = false; |
| 557 if (was_locked) | 557 if (was_locked) |
| 558 web_view()->didLosePointerLock(); | 558 web_view()->didLosePointerLock(); |
| 559 } | 559 } |
| 560 | 560 |
| 561 bool TestRunnerForSpecificView::CallShouldCloseOnWebView() { | 561 bool TestRunnerForSpecificView::CallShouldCloseOnWebView() { |
| 562 return web_view()->mainFrame()->dispatchBeforeUnloadEvent(); | 562 return web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent( |
|
nasko
2016/05/09 21:56:04
I don't think you can make this assumption here. I
Łukasz Anforowicz
2016/05/09 22:43:23
nasko@ - you are correct that web_view()->mainFram
clamy
2016/05/10 00:39:56
With the current architecture, you would get a NOT
clamy
2016/05/10 01:58:08
Went with CHECK(false).
| |
| 563 false); | |
| 563 } | 564 } |
| 564 | 565 |
| 565 void TestRunnerForSpecificView::SetDomainRelaxationForbiddenForURLScheme( | 566 void TestRunnerForSpecificView::SetDomainRelaxationForbiddenForURLScheme( |
| 566 bool forbidden, | 567 bool forbidden, |
| 567 const std::string& scheme) { | 568 const std::string& scheme) { |
| 568 web_view()->setDomainRelaxationForbidden(forbidden, | 569 web_view()->setDomainRelaxationForbidden(forbidden, |
| 569 WebString::fromUTF8(scheme)); | 570 WebString::fromUTF8(scheme)); |
| 570 } | 571 } |
| 571 | 572 |
| 572 v8::Local<v8::Value> | 573 v8::Local<v8::Value> |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 664 | 665 |
| 665 blink::WebView* TestRunnerForSpecificView::web_view() { | 666 blink::WebView* TestRunnerForSpecificView::web_view() { |
| 666 return web_test_proxy_base_->web_view(); | 667 return web_test_proxy_base_->web_view(); |
| 667 } | 668 } |
| 668 | 669 |
| 669 WebTestDelegate* TestRunnerForSpecificView::delegate() { | 670 WebTestDelegate* TestRunnerForSpecificView::delegate() { |
| 670 return web_test_proxy_base_->delegate(); | 671 return web_test_proxy_base_->delegate(); |
| 671 } | 672 } |
| 672 | 673 |
| 673 } // namespace test_runner | 674 } // namespace test_runner |
| OLD | NEW |