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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 host->GetView()->SetSize(gfx::Size(400, 400)); | 102 host->GetView()->SetSize(gfx::Size(400, 400)); |
103 | 103 |
104 base::string16 ready_title(base::ASCIIToUTF16("ready")); | 104 base::string16 ready_title(base::ASCIIToUTF16("ready")); |
105 TitleWatcher watcher(shell()->web_contents(), ready_title); | 105 TitleWatcher watcher(shell()->web_contents(), ready_title); |
106 ignore_result(watcher.WaitAndGetTitle()); | 106 ignore_result(watcher.WaitAndGetTitle()); |
107 | 107 |
108 MainThreadFrameObserver main_thread_sync(host); | 108 MainThreadFrameObserver main_thread_sync(host); |
109 main_thread_sync.Wait(); | 109 main_thread_sync.Wait(); |
110 } | 110 } |
111 | 111 |
| 112 // ContentBrowserTest: |
| 113 void SetUpCommandLine(base::CommandLine* cmd) override { |
| 114 // TODO(dtapuska): Remove this switch once wheel-gestures ships. |
| 115 cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); |
| 116 cmd->AppendSwitch(switches::kEnableWheelGestures); |
| 117 } |
| 118 |
112 int ExecuteScriptAndExtractInt(const std::string& script) { | 119 int ExecuteScriptAndExtractInt(const std::string& script) { |
113 int value = 0; | 120 int value = 0; |
114 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( | 121 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( |
115 shell()->web_contents(), "domAutomationController.send(" + script + ")", | 122 shell()->web_contents(), "domAutomationController.send(" + script + ")", |
116 &value)); | 123 &value)); |
117 return value; | 124 return value; |
118 } | 125 } |
119 | 126 |
120 int GetScrollTop() { | 127 int GetScrollTop() { |
121 return ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop"); | 128 return ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop"); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 #define MAYBE_PassiveTouchStartBlockingTouchEnd \ | 209 #define MAYBE_PassiveTouchStartBlockingTouchEnd \ |
203 PassiveTouchStartBlockingTouchEnd | 210 PassiveTouchStartBlockingTouchEnd |
204 #endif | 211 #endif |
205 IN_PROC_BROWSER_TEST_F(NonBlockingEventBrowserTest, | 212 IN_PROC_BROWSER_TEST_F(NonBlockingEventBrowserTest, |
206 MAYBE_PassiveTouchStartBlockingTouchEnd) { | 213 MAYBE_PassiveTouchStartBlockingTouchEnd) { |
207 LoadURL(kPassiveTouchStartBlockingTouchEndDataURL); | 214 LoadURL(kPassiveTouchStartBlockingTouchEndDataURL); |
208 DoTouchScroll(); | 215 DoTouchScroll(); |
209 } | 216 } |
210 | 217 |
211 } // namespace content | 218 } // namespace content |
OLD | NEW |