| 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/frame_messages.h" | 7 #include "content/common/frame_messages.h" |
| 8 #include "content/common/view_message_enums.h" | 8 #include "content/common/view_message_enums.h" |
| 9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 #include "content/public/test/render_view_test.h" | 10 #include "content/public/test/render_view_test.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 root_obj = document.accessibilityObject(); | 139 root_obj = document.accessibilityObject(); |
| 140 sink_->ClearMessages(); | 140 sink_->ClearMessages(); |
| 141 const WebAXObject& first_child = root_obj.childAt(0); | 141 const WebAXObject& first_child = root_obj.childAt(0); |
| 142 accessibility->HandleAXEvent( | 142 accessibility->HandleAXEvent( |
| 143 first_child, | 143 first_child, |
| 144 ui::AX_EVENT_LIVE_REGION_CHANGED); | 144 ui::AX_EVENT_LIVE_REGION_CHANGED); |
| 145 accessibility->SendPendingAccessibilityEvents(); | 145 accessibility->SendPendingAccessibilityEvents(); |
| 146 EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser()); | 146 EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser()); |
| 147 } | 147 } |
| 148 | 148 |
| 149 // http://crbug.com/253537 | 149 // http://crbug.com/253537, http://crbug.com/498407 |
| 150 #if defined(OS_ANDROID) | 150 #if defined(OS_ANDROID) || defined(OS_LINUX) |
| 151 #define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \ | 151 #define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \ |
| 152 DISABLED_AccessibilityMessagesQueueWhileSwappedOut | 152 DISABLED_AccessibilityMessagesQueueWhileSwappedOut |
| 153 #else | 153 #else |
| 154 #define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \ | 154 #define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \ |
| 155 AccessibilityMessagesQueueWhileSwappedOut | 155 AccessibilityMessagesQueueWhileSwappedOut |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 TEST_F(RendererAccessibilityTest, | 158 TEST_F(RendererAccessibilityTest, |
| 159 MAYBE_AccessibilityMessagesQueueWhileSwappedOut) { | 159 MAYBE_AccessibilityMessagesQueueWhileSwappedOut) { |
| 160 // This test breaks down in --site-per-process, as swapping out destroys | 160 // This test breaks down in --site-per-process, as swapping out destroys |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 412 |
| 413 const IPC::Message* message = | 413 const IPC::Message* message = |
| 414 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); | 414 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); |
| 415 ASSERT_TRUE(message); | 415 ASSERT_TRUE(message); |
| 416 base::Tuple<std::vector<AccessibilityHostMsg_EventParams>, int> param; | 416 base::Tuple<std::vector<AccessibilityHostMsg_EventParams>, int> param; |
| 417 AccessibilityHostMsg_Events::Read(message, ¶m); | 417 AccessibilityHostMsg_Events::Read(message, ¶m); |
| 418 ASSERT_EQ(0U, base::get<0>(param).size()); | 418 ASSERT_EQ(0U, base::get<0>(param).size()); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace content | 421 } // namespace content |
| OLD | NEW |