OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "base/time/time.h" | 6 #include "base/time/time.h" |
7 #include "content/common/accessibility_messages.h" | 7 #include "content/common/accessibility_messages.h" |
8 #include "content/common/frame_messages.h" | 8 #include "content/common/frame_messages.h" |
9 #include "content/common/site_isolation_policy.h" | 9 #include "content/common/site_isolation_policy.h" |
10 #include "content/common/view_message_enums.h" | 10 #include "content/common/view_message_enums.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 AccessibilityHostMsg_EventParams event; | 394 AccessibilityHostMsg_EventParams event; |
395 GetLastAccEvent(&event); | 395 GetLastAccEvent(&event); |
396 ASSERT_EQ(5U, event.update.nodes.size()); | 396 ASSERT_EQ(5U, event.update.nodes.size()); |
397 | 397 |
398 EXPECT_EQ(body.axID(), event.update.nodes[0].id); | 398 EXPECT_EQ(body.axID(), event.update.nodes[0].id); |
399 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id); | 399 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id); |
400 // The third event is to update text_2, but its id changes | 400 // The third event is to update text_2, but its id changes |
401 // so we don't have a test expectation for it. | 401 // so we don't have a test expectation for it. |
402 } | 402 } |
403 | 403 |
404 TEST_F(RendererAccessibilityTest, EventOnObjectNotInTree) { | 404 // http://crbug.com/532249 |
| 405 TEST_F(RendererAccessibilityTest, DISABLED_EventOnObjectNotInTree) { |
405 // Test RendererAccessibility and make sure it doesn't send anything | 406 // Test RendererAccessibility and make sure it doesn't send anything |
406 // if we get a notification from Blink for an object that isn't in the | 407 // if we get a notification from Blink for an object that isn't in the |
407 // tree, like the scroll area that's the parent of the main document, | 408 // tree, like the scroll area that's the parent of the main document, |
408 // which we don't expose. | 409 // which we don't expose. |
409 std::string html = "<body><input></body>"; | 410 std::string html = "<body><input></body>"; |
410 LoadHTML(html.c_str()); | 411 LoadHTML(html.c_str()); |
411 | 412 |
412 scoped_ptr<TestRendererAccessibility> accessibility( | 413 scoped_ptr<TestRendererAccessibility> accessibility( |
413 new TestRendererAccessibility(frame())); | 414 new TestRendererAccessibility(frame())); |
414 accessibility->SendPendingAccessibilityEvents(); | 415 accessibility->SendPendingAccessibilityEvents(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 ASSERT_EQ(1U, i->update.nodes.size()); | 472 ASSERT_EQ(1U, i->update.nodes.size()); |
472 if (root_obj.axID() == i->update.nodes[0].id) | 473 if (root_obj.axID() == i->update.nodes[0].id) |
473 had_root_update = true; | 474 had_root_update = true; |
474 if (input_obj.axID() == i->update.nodes[0].id) | 475 if (input_obj.axID() == i->update.nodes[0].id) |
475 had_input_update = true; | 476 had_input_update = true; |
476 } | 477 } |
477 ASSERT_TRUE(had_root_update); | 478 ASSERT_TRUE(had_root_update); |
478 ASSERT_TRUE(had_input_update); | 479 ASSERT_TRUE(had_input_update); |
479 } | 480 } |
480 } // namespace content | 481 } // namespace content |
OLD | NEW |