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

Unified Diff: content/shell/renderer/test_runner/mock_web_midi_accessor.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_web_midi_accessor.cc
diff --git a/content/shell/renderer/test_runner/mock_web_midi_accessor.cc b/content/shell/renderer/test_runner/mock_web_midi_accessor.cc
deleted file mode 100644
index 2548af27dac41bdd8fae04ccce265599f3c59991..0000000000000000000000000000000000000000
--- a/content/shell/renderer/test_runner/mock_web_midi_accessor.cc
+++ /dev/null
@@ -1,65 +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_web_midi_accessor.h"
-
-#include "content/shell/renderer/test_runner/test_interfaces.h"
-#include "content/shell/renderer/test_runner/test_runner.h"
-#include "content/shell/renderer/test_runner/web_test_delegate.h"
-#include "content/shell/renderer/test_runner/web_test_runner.h"
-#include "third_party/WebKit/public/platform/WebMIDIAccessorClient.h"
-
-namespace content {
-
-namespace {
-
-class DidStartSessionTask : public WebMethodTask<MockWebMIDIAccessor> {
- public:
- DidStartSessionTask(MockWebMIDIAccessor* object,
- blink::WebMIDIAccessorClient* client,
- bool result)
- : WebMethodTask<MockWebMIDIAccessor>(object),
- client_(client),
- result_(result) {}
-
- void RunIfValid() override {
- client_->didStartSession(result_, "InvalidStateError", "");
- }
-
- private:
- blink::WebMIDIAccessorClient* client_;
- bool result_;
-
- DISALLOW_COPY_AND_ASSIGN(DidStartSessionTask);
-};
-
-} // namespace
-
-MockWebMIDIAccessor::MockWebMIDIAccessor(blink::WebMIDIAccessorClient* client,
- TestInterfaces* interfaces)
- : client_(client), interfaces_(interfaces) {
-}
-
-MockWebMIDIAccessor::~MockWebMIDIAccessor() {
-}
-
-void MockWebMIDIAccessor::startSession() {
- // Add a mock input and output port.
- blink::WebMIDIAccessorClient::MIDIPortState state =
- blink::WebMIDIAccessorClient::MIDIPortStateConnected;
- client_->didAddInputPort("MockInputID",
- "MockInputManufacturer",
- "MockInputName",
- "MockInputVersion",
- state);
- client_->didAddOutputPort("MockOutputID",
- "MockOutputManufacturer",
- "MockOutputName",
- "MockOutputVersion",
- state);
- interfaces_->GetDelegate()->PostTask(new DidStartSessionTask(
- this, client_, interfaces_->GetTestRunner()->midiAccessorResult()));
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698