| 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/web_test_proxy.h" | 5 #include "components/test_runner/web_test_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <cctype> | 10 #include <cctype> |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 blink::WebAXEvent event) { | 652 blink::WebAXEvent event) { |
| 653 // Only hook the accessibility events occured during the test run. | 653 // Only hook the accessibility events occured during the test run. |
| 654 // This check prevents false positives in WebLeakDetector. | 654 // This check prevents false positives in WebLeakDetector. |
| 655 // The pending tasks in browser/renderer message queue may trigger | 655 // The pending tasks in browser/renderer message queue may trigger |
| 656 // accessibility events, | 656 // accessibility events, |
| 657 // and AccessibilityController will hold on to their target nodes if we don't | 657 // and AccessibilityController will hold on to their target nodes if we don't |
| 658 // ignore them here. | 658 // ignore them here. |
| 659 if (!test_interfaces_->GetTestRunner()->TestIsRunning()) | 659 if (!test_interfaces_->GetTestRunner()->TestIsRunning()) |
| 660 return; | 660 return; |
| 661 | 661 |
| 662 if (event == blink::WebAXEventFocus) | |
| 663 test_interfaces_->GetAccessibilityController()->SetFocusedElement(obj); | |
| 664 | |
| 665 const char* event_name = NULL; | 662 const char* event_name = NULL; |
| 666 switch (event) { | 663 switch (event) { |
| 667 case blink::WebAXEventActiveDescendantChanged: | 664 case blink::WebAXEventActiveDescendantChanged: |
| 668 event_name = "ActiveDescendantChanged"; | 665 event_name = "ActiveDescendantChanged"; |
| 669 break; | 666 break; |
| 670 case blink::WebAXEventAlert: | 667 case blink::WebAXEventAlert: |
| 671 event_name = "Alert"; | 668 event_name = "Alert"; |
| 672 break; | 669 break; |
| 673 case blink::WebAXEventAriaAttributeChanged: | 670 case blink::WebAXEventAriaAttributeChanged: |
| 674 event_name = "AriaAttributeChanged"; | 671 event_name = "AriaAttributeChanged"; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 callback->onError(blink::WebSetSinkIdError::NotAuthorized); | 1299 callback->onError(blink::WebSetSinkIdError::NotAuthorized); |
| 1303 else | 1300 else |
| 1304 callback->onError(blink::WebSetSinkIdError::NotFound); | 1301 callback->onError(blink::WebSetSinkIdError::NotFound); |
| 1305 } | 1302 } |
| 1306 | 1303 |
| 1307 blink::WebString WebTestProxyBase::acceptLanguages() { | 1304 blink::WebString WebTestProxyBase::acceptLanguages() { |
| 1308 return blink::WebString::fromUTF8(accept_languages_); | 1305 return blink::WebString::fromUTF8(accept_languages_); |
| 1309 } | 1306 } |
| 1310 | 1307 |
| 1311 } // namespace test_runner | 1308 } // namespace test_runner |
| OLD | NEW |