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

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 330113002: Fixing flaky overscroll and touch exploration mode browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementing review feedback. Created 6 years, 6 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
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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class WebContents; 50 class WebContents;
51 51
52 // Generate a URL for a file path including a query string. 52 // Generate a URL for a file path including a query string.
53 GURL GetFileUrlWithQuery(const base::FilePath& path, 53 GURL GetFileUrlWithQuery(const base::FilePath& path,
54 const std::string& query_string); 54 const std::string& query_string);
55 55
56 // Waits for a load stop for the specified |web_contents|'s controller, if the 56 // Waits for a load stop for the specified |web_contents|'s controller, if the
57 // tab is currently web_contents. Otherwise returns immediately. 57 // tab is currently web_contents. Otherwise returns immediately.
58 void WaitForLoadStop(WebContents* web_contents); 58 void WaitForLoadStop(WebContents* web_contents);
59 59
60 // If WebContent's view is currently being resized, this will wait for the ack
61 // from the renderer that the resize is complete and for the
62 // WindowEventDispatcher to release the pointer moves. If there's no resize in
63 // progress, the method will return right away.
64 void WaitForResizeComplete(WebContents* web_contents);
65
60 // Causes the specified web_contents to crash. Blocks until it is crashed. 66 // Causes the specified web_contents to crash. Blocks until it is crashed.
61 void CrashTab(WebContents* web_contents); 67 void CrashTab(WebContents* web_contents);
62 68
63 // Simulates clicking at the center of the given tab asynchronously; modifiers 69 // Simulates clicking at the center of the given tab asynchronously; modifiers
64 // may contain bits from WebInputEvent::Modifiers. 70 // may contain bits from WebInputEvent::Modifiers.
65 void SimulateMouseClick(WebContents* web_contents, 71 void SimulateMouseClick(WebContents* web_contents,
66 int modifiers, 72 int modifiers,
67 blink::WebMouseEvent::Button button); 73 blink::WebMouseEvent::Button button);
68 74
69 // Simulates clicking at the point |point| of the given tab asynchronously; 75 // Simulates clicking at the point |point| of the given tab asynchronously;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 NotificationRegistrar registrar_; 298 NotificationRegistrar registrar_;
293 std::queue<std::string> message_queue_; 299 std::queue<std::string> message_queue_;
294 scoped_refptr<MessageLoopRunner> message_loop_runner_; 300 scoped_refptr<MessageLoopRunner> message_loop_runner_;
295 301
296 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); 302 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue);
297 }; 303 };
298 304
299 } // namespace content 305 } // namespace content
300 306
301 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 307 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698