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

Side by Side Diff: components/test_runner/web_test_proxy.cc

Issue 1705853002: NOT FOR REVIEW. ax tree focus with debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 years, 10 months 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 #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
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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 1296 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
1300 else 1297 else
1301 callback->onError(blink::WebSetSinkIdError::NotFound); 1298 callback->onError(blink::WebSetSinkIdError::NotFound);
1302 } 1299 }
1303 1300
1304 blink::WebString WebTestProxyBase::acceptLanguages() { 1301 blink::WebString WebTestProxyBase::acceptLanguages() {
1305 return blink::WebString::fromUTF8(accept_languages_); 1302 return blink::WebString::fromUTF8(accept_languages_);
1306 } 1303 }
1307 1304
1308 } // namespace test_runner 1305 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698