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

Unified Diff: content/shell/renderer/test_runner/mock_color_chooser.cc

Issue 1167703002: Move test runner to a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 7 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
Index: content/shell/renderer/test_runner/mock_color_chooser.cc
diff --git a/content/shell/renderer/test_runner/mock_color_chooser.cc b/content/shell/renderer/test_runner/mock_color_chooser.cc
deleted file mode 100644
index be1fc88babe69485283e88d3126fd7e5ffe4a368..0000000000000000000000000000000000000000
--- a/content/shell/renderer/test_runner/mock_color_chooser.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 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 "content/shell/renderer/test_runner/mock_color_chooser.h"
-
-#include "content/shell/renderer/test_runner/web_test_delegate.h"
-#include "content/shell/renderer/test_runner/web_test_proxy.h"
-
-namespace content {
-
-namespace {
-class HostMethodTask : public WebMethodTask<MockColorChooser> {
- public:
- typedef void (MockColorChooser::*CallbackMethodType)();
- HostMethodTask(MockColorChooser* object, CallbackMethodType callback)
- : WebMethodTask<MockColorChooser>(object),
- callback_(callback) {}
-
- void RunIfValid() override { (object_->*callback_)(); }
-
- private:
- CallbackMethodType callback_;
-};
-
-} // namespace
-
-MockColorChooser::MockColorChooser(blink::WebColorChooserClient* client,
- WebTestDelegate* delegate,
- WebTestProxyBase* proxy)
- : client_(client),
- delegate_(delegate),
- proxy_(proxy) {
- proxy_->DidOpenChooser();
-}
-
-MockColorChooser::~MockColorChooser() {
- proxy_->DidCloseChooser();
-}
-
-void MockColorChooser::setSelectedColor(const blink::WebColor color) {}
-
-void MockColorChooser::endChooser() {
- delegate_->PostDelayedTask(
- new HostMethodTask(this, &MockColorChooser::InvokeDidEndChooser), 0);
-}
-
-void MockColorChooser::InvokeDidEndChooser() {
- client_->didEndChooser();
-}
-
-} // namespace content
« no previous file with comments | « content/shell/renderer/test_runner/mock_color_chooser.h ('k') | content/shell/renderer/test_runner/mock_constraints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698