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

Unified Diff: components/web_view/test_frame_tree_delegate.cc

Issue 1677293002: Bye bye Mandoline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 4 years, 10 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 | « components/web_view/test_frame_tree_delegate.h ('k') | components/web_view/test_runner/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/test_frame_tree_delegate.cc
diff --git a/components/web_view/test_frame_tree_delegate.cc b/components/web_view/test_frame_tree_delegate.cc
deleted file mode 100644
index b1f2c15b05ee2da4c47e9ce8efef85216da32cc6..0000000000000000000000000000000000000000
--- a/components/web_view/test_frame_tree_delegate.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/web_view/test_frame_tree_delegate.h"
-
-#include <utility>
-
-#include "base/run_loop.h"
-#include "components/web_view/client_initiated_frame_connection.h"
-#include "components/web_view/frame_connection.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace web_view {
-
-TestFrameTreeDelegate::TestFrameTreeDelegate(mojo::Shell* shell)
- : shell_(shell),
- waiting_for_create_frame_(false),
- waiting_for_destroy_frame_(nullptr),
- most_recent_frame_(nullptr),
- waiting_for_frame_disconnected_(nullptr) {}
-
-TestFrameTreeDelegate::~TestFrameTreeDelegate() {}
-
-Frame* TestFrameTreeDelegate::WaitForCreateFrame() {
- if (is_waiting()) {
- ADD_FAILURE() << "already waiting";
- return nullptr;
- }
- waiting_for_create_frame_ = true;
- run_loop_.reset(new base::RunLoop);
- run_loop_->Run();
- run_loop_.reset();
- return most_recent_frame_;
-}
-
-void TestFrameTreeDelegate::WaitForDestroyFrame(Frame* frame) {
- ASSERT_FALSE(is_waiting());
- waiting_for_destroy_frame_ = frame;
- run_loop_.reset(new base::RunLoop);
- run_loop_->Run();
- run_loop_.reset();
-}
-
-void TestFrameTreeDelegate::WaitForFrameDisconnected(Frame* frame) {
- ASSERT_FALSE(is_waiting());
- waiting_for_frame_disconnected_ = frame;
- run_loop_.reset(new base::RunLoop);
- run_loop_->Run();
- run_loop_.reset();
-}
-
-scoped_ptr<FrameUserData> TestFrameTreeDelegate::CreateUserDataForNewFrame(
- mojom::FrameClientPtr frame_client) {
- return make_scoped_ptr(
- new ClientInitiatedFrameConnection(std::move(frame_client)));
-}
-
-bool TestFrameTreeDelegate::CanPostMessageEventToFrame(
- const Frame* source,
- const Frame* target,
- mojom::HTMLMessageEvent* event) {
- return true;
-}
-
-void TestFrameTreeDelegate::LoadingStateChanged(bool loading, double progress) {
-}
-
-void TestFrameTreeDelegate::TitleChanged(const mojo::String& title) {}
-
-void TestFrameTreeDelegate::NavigateTopLevel(Frame* source,
- mojo::URLRequestPtr request) {}
-
-void TestFrameTreeDelegate::CanNavigateFrame(
- Frame* target,
- mojo::URLRequestPtr request,
- const CanNavigateFrameCallback& callback) {
- FrameConnection::CreateConnectionForCanNavigateFrame(
- shell_, target, std::move(request), callback);
-}
-
-void TestFrameTreeDelegate::DidStartNavigation(Frame* frame) {}
-
-void TestFrameTreeDelegate::DidCommitProvisionalLoad(Frame* frame) {}
-
-void TestFrameTreeDelegate::DidNavigateLocally(Frame* source,
- const GURL& url) {}
-
-void TestFrameTreeDelegate::DidCreateFrame(Frame* frame) {
- if (waiting_for_create_frame_) {
- most_recent_frame_ = frame;
- run_loop_->Quit();
- }
-}
-
-void TestFrameTreeDelegate::DidDestroyFrame(Frame* frame) {
- if (waiting_for_destroy_frame_ == frame) {
- waiting_for_destroy_frame_ = nullptr;
- run_loop_->Quit();
- }
-}
-
-void TestFrameTreeDelegate::OnWindowEmbeddedInFrameDisconnected(Frame* frame) {
- if (waiting_for_frame_disconnected_ == frame) {
- waiting_for_frame_disconnected_ = nullptr;
- run_loop_->Quit();
- }
-}
-
-} // namespace web_view
« no previous file with comments | « components/web_view/test_frame_tree_delegate.h ('k') | components/web_view/test_runner/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698