OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // ContentBrowserTest: | 112 // ContentBrowserTest: |
113 void SetUpCommandLine(base::CommandLine* cmd) override { | 113 void SetUpCommandLine(base::CommandLine* cmd) override { |
114 // TODO(dtapuska): Remove this switch once wheel-gestures ships. | 114 // TODO(dtapuska): Remove this switch once wheel-gestures ships. |
115 cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); | 115 cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); |
116 cmd->AppendSwitch(switches::kEnableWheelGestures); | 116 cmd->AppendSwitch(switches::kEnableWheelGestures); |
117 } | 117 } |
118 | 118 |
119 int ExecuteScriptAndExtractInt(const std::string& script) { | 119 int ExecuteScriptAndExtractInt(const std::string& script) { |
120 int value = 0; | 120 int value = 0; |
121 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( | 121 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( |
122 shell()->web_contents(), "domAutomationController.send(" + script + ")", | 122 shell(), "domAutomationController.send(" + script + ")", &value)); |
123 &value)); | |
124 return value; | 123 return value; |
125 } | 124 } |
126 | 125 |
127 int GetScrollTop() { | 126 int GetScrollTop() { |
128 return ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop"); | 127 return ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop"); |
129 } | 128 } |
130 | 129 |
131 void DoWheelScroll() { | 130 void DoWheelScroll() { |
132 EXPECT_EQ(0, GetScrollTop()); | 131 EXPECT_EQ(0, GetScrollTop()); |
133 | 132 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 #define MAYBE_PassiveTouchStartBlockingTouchEnd \ | 208 #define MAYBE_PassiveTouchStartBlockingTouchEnd \ |
210 PassiveTouchStartBlockingTouchEnd | 209 PassiveTouchStartBlockingTouchEnd |
211 #endif | 210 #endif |
212 IN_PROC_BROWSER_TEST_F(NonBlockingEventBrowserTest, | 211 IN_PROC_BROWSER_TEST_F(NonBlockingEventBrowserTest, |
213 MAYBE_PassiveTouchStartBlockingTouchEnd) { | 212 MAYBE_PassiveTouchStartBlockingTouchEnd) { |
214 LoadURL(kPassiveTouchStartBlockingTouchEndDataURL); | 213 LoadURL(kPassiveTouchStartBlockingTouchEndDataURL); |
215 DoTouchScroll(); | 214 DoTouchScroll(); |
216 } | 215 } |
217 | 216 |
218 } // namespace content | 217 } // namespace content |
OLD | NEW |