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

Unified Diff: chrome/browser/chromeos/launcher_search_provider/test_util.cc

Issue 1060733003: Support custom icon in search result. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP: Add API test. Created 5 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
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

Powered by Google App Engine
This is Rietveld 408576698