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

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2780373002: Use observer pattern instead of sniffing SwapCompositorFrame IPC (Closed)
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/guest_view/web_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index a8f1beca36a81fe08fa25bc6b0e81e48ac219da3..59b15a38dfe45420d11194d4e8ccf5f8f6991347 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -822,9 +822,6 @@ class WebViewTestBase : public extensions::PlatformAppBrowserTest {
~WebViewTestBase() override {}
- protected:
- scoped_refptr<content::FrameWatcher> frame_watcher_;
-
private:
bool UsesFakeSpeech() {
const testing::TestInfo* const test_info =
@@ -3879,10 +3876,7 @@ class WebViewFocusTest : public WebViewTest {
}
void ForceCompositorFrame() {
- if (!frame_watcher_) {
- frame_watcher_ = new content::FrameWatcher();
- frame_watcher_->AttachTo(GetEmbedderWebContents());
- }
+ frame_watcher_.Observe(GetEmbedderWebContents());
while (!RequestFrame(GetEmbedderWebContents())) {
// RequestFrame failed because we were waiting on an ack ... wait a short
@@ -3893,11 +3887,11 @@ class WebViewFocusTest : public WebViewTest {
base::TimeDelta::FromMilliseconds(10));
run_loop.Run();
}
- frame_watcher_->WaitFrames(1);
+ frame_watcher_.WaitFrames(1);
}
private:
- scoped_refptr<content::FrameWatcher> frame_watcher_;
+ content::FrameWatcher frame_watcher_;
};
INSTANTIATE_TEST_CASE_P(WebViewTests, WebViewFocusTest, testing::Values(false));
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698