| Index: chrome/browser/chromeos/launcher_search_provider/test_util.cc
|
| diff --git a/chrome/browser/chromeos/launcher_search_provider/test_util.cc b/chrome/browser/chromeos/launcher_search_provider/test_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..71fdbcb69c077a2ffa82f94ed24fe9fe3252b34b
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/launcher_search_provider/test_util.cc
|
| @@ -0,0 +1,29 @@
|
| +// 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 "chrome/browser/chromeos/launcher_search_provider/test_util.h"
|
| +
|
| +#include "extensions/browser/event_router.h"
|
| +#include "extensions/common/api/test.h"
|
| +
|
| +namespace chromeos {
|
| +namespace launcher_search_provider {
|
| +
|
| +void TestUtil::SendMessageToTestExtension(Profile* profile,
|
| + const std::string& message) {
|
| + namespace OnMessage = extensions::core_api::test::OnMessage;
|
| +
|
| + // TODO(yawano): Return here if it's not in the test process. Do this in the
|
| + // next patch set.
|
| +
|
| + // Sends message to test extension.
|
| + OnMessage::Info info;
|
| + info.data = message;
|
| + info.last_message = true;
|
| + extensions::EventRouter::Get(profile)->BroadcastEvent(make_scoped_ptr(
|
| + new extensions::Event(OnMessage::kEventName, OnMessage::Create(info))));
|
| +}
|
| +
|
| +} // namespace launcher_search_provider
|
| +} // namespace chromeos
|
|
|