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

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

Issue 2558933002: Add more fine-grained accessibility modes. (Closed)
Patch Set: Reformat enums as uppercase Created 4 years 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.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) 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 extra_data = static_cast<RequestExtraData*>(request.getExtraData()); 1962 extra_data = static_cast<RequestExtraData*>(request.getExtraData());
1963 ASSERT_TRUE(extra_data); 1963 ASSERT_TRUE(extra_data);
1964 EXPECT_EQ(extra_data->service_worker_provider_id(), 1964 EXPECT_EQ(extra_data->service_worker_provider_id(),
1965 provider->provider_id()); 1965 provider->provider_id());
1966 } 1966 }
1967 1967
1968 TEST_F(RenderViewImplTest, OnSetAccessibilityMode) { 1968 TEST_F(RenderViewImplTest, OnSetAccessibilityMode) {
1969 ASSERT_EQ(AccessibilityModeOff, frame()->accessibility_mode()); 1969 ASSERT_EQ(AccessibilityModeOff, frame()->accessibility_mode());
1970 ASSERT_FALSE(frame()->render_accessibility()); 1970 ASSERT_FALSE(frame()->render_accessibility());
1971 1971
1972 frame()->SetAccessibilityMode(AccessibilityModeTreeOnly); 1972 frame()->SetAccessibilityMode(ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY);
1973 ASSERT_EQ(AccessibilityModeTreeOnly, frame()->accessibility_mode()); 1973 ASSERT_EQ(ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY,
1974 frame()->accessibility_mode());
1974 ASSERT_TRUE(frame()->render_accessibility()); 1975 ASSERT_TRUE(frame()->render_accessibility());
1975 1976
1976 frame()->SetAccessibilityMode(AccessibilityModeOff); 1977 frame()->SetAccessibilityMode(AccessibilityModeOff);
1977 ASSERT_EQ(AccessibilityModeOff, frame()->accessibility_mode()); 1978 ASSERT_EQ(AccessibilityModeOff, frame()->accessibility_mode());
1978 ASSERT_FALSE(frame()->render_accessibility()); 1979 ASSERT_FALSE(frame()->render_accessibility());
1979 1980
1980 frame()->SetAccessibilityMode(AccessibilityModeComplete); 1981 frame()->SetAccessibilityMode(ACCESSIBILITY_MODE_COMPLETE);
1981 ASSERT_EQ(AccessibilityModeComplete, frame()->accessibility_mode()); 1982 ASSERT_EQ(ACCESSIBILITY_MODE_COMPLETE, frame()->accessibility_mode());
1982 ASSERT_TRUE(frame()->render_accessibility()); 1983 ASSERT_TRUE(frame()->render_accessibility());
1983 } 1984 }
1984 1985
1985 // Checks that when a navigation starts in the renderer, |navigation_start| is 1986 // Checks that when a navigation starts in the renderer, |navigation_start| is
1986 // recorded at an appropriate time and is passed in the corresponding message. 1987 // recorded at an appropriate time and is passed in the corresponding message.
1987 TEST_F(RenderViewImplTest, RendererNavigationStartTransmittedToBrowser) { 1988 TEST_F(RenderViewImplTest, RendererNavigationStartTransmittedToBrowser) {
1988 base::TimeTicks lower_bound_navigation_start(base::TimeTicks::Now()); 1989 base::TimeTicks lower_bound_navigation_start(base::TimeTicks::Now());
1989 frame()->GetWebFrame()->loadHTMLString( 1990 frame()->GetWebFrame()->loadHTMLString(
1990 "hello world", blink::WebURL(GURL("data:text/html,"))); 1991 "hello world", blink::WebURL(GURL("data:text/html,")));
1991 1992
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 ExpectPauseAndResume(3); 2551 ExpectPauseAndResume(3);
2551 blink::WebScriptSource source2( 2552 blink::WebScriptSource source2(
2552 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2553 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2553 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2554 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2554 2555
2555 EXPECT_FALSE(IsPaused()); 2556 EXPECT_FALSE(IsPaused());
2556 Detach(); 2557 Detach();
2557 } 2558 }
2558 2559
2559 } // namespace content 2560 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698