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

Side by Side Diff: content/renderer/renderer_accessibility_browsertest.cc

Issue 11103025: Revert 161256 - Fix the crash that was happening on the buildbot (but not trybots, for a strange re… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « content/renderer/render_widget_browsertest.cc ('k') | no next file » | 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) 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "content/common/accessibility_messages.h" 6 #include "content/common/accessibility_messages.h"
7 #include "content/common/accessibility_node_data.h" 7 #include "content/common/accessibility_node_data.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "content/public/test/render_view_test.h" 10 #include "content/public/test/render_view_test.h"
11 #include "content/shell/shell_main_delegate.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
14 15
15 using content::AccessibilityNodeData; 16 using content::AccessibilityNodeData;
16 17
17 class RendererAccessibilityTest : public content::RenderViewTest { 18 class RendererAccessibilityTest : public content::RenderViewTest {
18 public: 19 public:
19 RendererAccessibilityTest() {} 20 RendererAccessibilityTest() {}
20 21
21 RenderViewImpl* view() { 22 RenderViewImpl* view() {
22 return static_cast<RenderViewImpl*>(view_); 23 return static_cast<RenderViewImpl*>(view_);
23 } 24 }
24 25
25 virtual void SetUp() { 26 virtual void SetUp() {
26 content::RenderViewTest::SetUp(); 27 content::RenderViewTest::SetUp();
27 sink_ = &render_thread_->sink(); 28 sink_ = &render_thread_->sink();
29 content::ShellMainDelegate::InitializeResourceBundle();
28 } 30 }
29 31
30 void SetMode(AccessibilityMode mode) { 32 void SetMode(AccessibilityMode mode) {
31 view()->OnSetAccessibilityMode(mode); 33 view()->OnSetAccessibilityMode(mode);
32 } 34 }
33 35
34 void GetLastAccNotification( 36 void GetLastAccNotification(
35 AccessibilityHostMsg_NotificationParams* params) { 37 AccessibilityHostMsg_NotificationParams* params) {
36 const IPC::Message* message = 38 const IPC::Message* message =
37 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Notifications::ID); 39 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Notifications::ID);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Clear focus. 183 // Clear focus.
182 { 184 {
183 SCOPED_TRACE("Back to document."); 185 SCOPED_TRACE("Back to document.");
184 sink_->ClearMessages(); 186 sink_->ClearMessages();
185 ExecuteJavaScript("document.activeElement.blur()"); 187 ExecuteJavaScript("document.activeElement.blur()");
186 AccessibilityHostMsg_NotificationParams notification; 188 AccessibilityHostMsg_NotificationParams notification;
187 GetLastAccNotification(&notification); 189 GetLastAccNotification(&notification);
188 EXPECT_EQ(notification.id, 1); 190 EXPECT_EQ(notification.id, 1);
189 } 191 }
190 } 192 }
OLDNEW
« no previous file with comments | « content/renderer/render_widget_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698