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

Side by Side Diff: chrome/browser/accessibility/accessibility_win_browsertest.cc

Issue 6469038: Quick fix for problems with editable text field accessibility by not sending... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/webaccessibility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <atlbase.h> 5 #include <atlbase.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/scoped_comptr_win.h" 8 #include "base/scoped_comptr_win.h"
9 #include "chrome/browser/automation/ui_controls.h" 9 #include "chrome/browser/automation/ui_controls.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, 556 IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
557 TestNotificationValueChanged) { 557 TestNotificationValueChanged) {
558 GURL tree_url("data:text/html,<body><input type='text' value='old value'/>" 558 GURL tree_url("data:text/html,<body><input type='text' value='old value'/>"
559 "</body>"); 559 "</body>");
560 browser()->OpenURL(tree_url, GURL(), CURRENT_TAB, PageTransition::TYPED); 560 browser()->OpenURL(tree_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
561 GetRendererAccessible(); 561 GetRendererAccessible();
562 ui_test_utils::WaitForNotification( 562 ui_test_utils::WaitForNotification(
563 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED); 563 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
564 564
565 // Check the browser's copy of the renderer accessibility tree. 565 // Check the browser's copy of the renderer accessibility tree.
566 AccessibleChecker text_field_div_checker(L"", L"div", L"");
567 AccessibleChecker text_field_checker(L"", ROLE_SYSTEM_TEXT, L"old value"); 566 AccessibleChecker text_field_checker(L"", ROLE_SYSTEM_TEXT, L"old value");
568 text_field_checker.SetExpectedState(STATE_SYSTEM_FOCUSABLE); 567 text_field_checker.SetExpectedState(STATE_SYSTEM_FOCUSABLE);
569 AccessibleChecker body_checker(L"", L"body", L""); 568 AccessibleChecker body_checker(L"", L"body", L"");
570 AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L""); 569 AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L"");
571 text_field_checker.AppendExpectedChild(&text_field_div_checker);
572 body_checker.AppendExpectedChild(&text_field_checker); 570 body_checker.AppendExpectedChild(&text_field_checker);
573 document_checker.AppendExpectedChild(&body_checker); 571 document_checker.AppendExpectedChild(&body_checker);
574 document_checker.CheckAccessible(GetRendererAccessible()); 572 document_checker.CheckAccessible(GetRendererAccessible());
575 573
576 // Set the value of the text control 574 // Set the value of the text control
577 ExecuteScript(L"document.body.children[0].value='new value'"); 575 ExecuteScript(L"document.body.children[0].value='new value'");
578 ui_test_utils::WaitForNotification( 576 ui_test_utils::WaitForNotification(
579 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED); 577 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
580 578
581 // Check that the accessibility tree of the browser has been updated. 579 // Check that the accessibility tree of the browser has been updated.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 ASSERT_EQ(S_OK, hr); 701 ASSERT_EQ(S_OK, hr);
704 hr = checkbox_isimpledomnode->get_nodeInfo( 702 hr = checkbox_isimpledomnode->get_nodeInfo(
705 &node_name, &name_space_id, &node_value, &num_children, &unique_id, 703 &node_name, &name_space_id, &node_value, &num_children, &unique_id,
706 &node_type); 704 &node_type);
707 ASSERT_EQ(S_OK, hr); 705 ASSERT_EQ(S_OK, hr);
708 EXPECT_STREQ(L"input", wstring(node_name, SysStringLen(node_name)).c_str()); 706 EXPECT_STREQ(L"input", wstring(node_name, SysStringLen(node_name)).c_str());
709 EXPECT_EQ(NODETYPE_ELEMENT, node_type); 707 EXPECT_EQ(NODETYPE_ELEMENT, node_type);
710 EXPECT_EQ(0, num_children); 708 EXPECT_EQ(0, num_children);
711 } 709 }
712 } // namespace. 710 } // namespace.
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webaccessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698