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/public/test/browser_test_utils.h

Issue 2797473005: Fix interstitials on OOPIF-based guests. (Closed)
Patch Set: rebase Created 3 years, 8 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // A collections of functions designed for use with content_browsertests and 57 // A collections of functions designed for use with content_browsertests and
58 // browser_tests. 58 // browser_tests.
59 // TO BE CLEAR: any function here must work against both binaries. If it only 59 // TO BE CLEAR: any function here must work against both binaries. If it only
60 // works with browser_tests, it should be in chrome\test\base\ui_test_utils.h. 60 // works with browser_tests, it should be in chrome\test\base\ui_test_utils.h.
61 // If it only works with content_browsertests, it should be in 61 // If it only works with content_browsertests, it should be in
62 // content\test\content_browser_test_utils.h. 62 // content\test\content_browser_test_utils.h.
63 63
64 namespace content { 64 namespace content {
65 65
66 class BrowserContext; 66 class BrowserContext;
67 class InterstitialPage;
67 class MessageLoopRunner; 68 class MessageLoopRunner;
68 class NavigationHandle; 69 class NavigationHandle;
69 class RenderViewHost; 70 class RenderViewHost;
70 class RenderWidgetHost; 71 class RenderWidgetHost;
72 class RenderWidgetHostView;
71 class WebContents; 73 class WebContents;
72 74
73 // Navigate a frame with ID |iframe_id| to |url|, blocking until the navigation 75 // Navigate a frame with ID |iframe_id| to |url|, blocking until the navigation
74 // finishes. Uses a renderer-initiated navigation from script code in the 76 // finishes. Uses a renderer-initiated navigation from script code in the
75 // main frame. 77 // main frame.
76 bool NavigateIframeToURL(WebContents* web_contents, 78 bool NavigateIframeToURL(WebContents* web_contents,
77 std::string iframe_id, 79 std::string iframe_id,
78 const GURL& url); 80 const GURL& url);
79 81
80 // Generate a URL for a file path including a query string. 82 // Generate a URL for a file path including a query string.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // Get a snapshot of a web page's accessibility tree. 348 // Get a snapshot of a web page's accessibility tree.
347 ui::AXTreeUpdate GetAccessibilityTreeSnapshot(WebContents* web_contents); 349 ui::AXTreeUpdate GetAccessibilityTreeSnapshot(WebContents* web_contents);
348 350
349 // Find out if the BrowserPlugin for a guest WebContents is focused. Returns 351 // Find out if the BrowserPlugin for a guest WebContents is focused. Returns
350 // false if the WebContents isn't a guest with a BrowserPlugin. 352 // false if the WebContents isn't a guest with a BrowserPlugin.
351 bool IsWebContentsBrowserPluginFocused(content::WebContents* web_contents); 353 bool IsWebContentsBrowserPluginFocused(content::WebContents* web_contents);
352 354
353 // Returns the RenderWidgetHost that holds the mouse lock. 355 // Returns the RenderWidgetHost that holds the mouse lock.
354 RenderWidgetHost* GetMouseLockWidget(WebContents* web_contents); 356 RenderWidgetHost* GetMouseLockWidget(WebContents* web_contents);
355 357
358 // Returns true if inner |interstitial_page| is connected to an outer
359 // WebContents.
360 bool IsInnerInterstitialPageConnected(InterstitialPage* interstitial_page);
361
362 // Returns all the RenderWidgetHostViews inside the |web_contents| that are
363 // registered in the RenderWidgetHostInputEventRouter.
364 std::vector<RenderWidgetHostView*> GetInputEventRouterRenderWidgetHostViews(
365 WebContents* web_contents);
366
367 // Returns the focused RenderWidgetHost.
368 RenderWidgetHost* GetFocusedRenderWidgetHost(WebContents* web_contents);
369
370 // Route the |event| through the RenderWidgetHostInputEventRouter. This allows
371 // correct targeting of events to out of process iframes.
372 void RouteMouseEvent(WebContents* web_contents, blink::WebMouseEvent* event);
373
356 #if defined(USE_AURA) 374 #if defined(USE_AURA)
357 // The following two methods allow a test to send a touch tap sequence, and 375 // The following two methods allow a test to send a touch tap sequence, and
358 // a corresponding gesture tap sequence, by sending it to the top-level 376 // a corresponding gesture tap sequence, by sending it to the top-level
359 // WebContents for the page. 377 // WebContents for the page.
360 378
361 // Send a TouchStart/End sequence routed via the main frame's 379 // Send a TouchStart/End sequence routed via the main frame's
362 // RenderWidgetHostViewAura. 380 // RenderWidgetHostViewAura.
363 void SendRoutedTouchTapSequence(content::WebContents* web_contents, 381 void SendRoutedTouchTapSequence(content::WebContents* web_contents,
364 gfx::Point point); 382 gfx::Point point);
365 383
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 819
802 private: 820 private:
803 PwnMessageHelper(); // Not instantiable. 821 PwnMessageHelper(); // Not instantiable.
804 822
805 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); 823 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper);
806 }; 824 };
807 825
808 } // namespace content 826 } // namespace content
809 827
810 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 828 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698