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

Unified Diff: chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit Created 8 years, 3 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/extensions/api/messaging/native_messaging_apitest_posix.cc
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc b/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f5b2b3f7745b276c307116ea3de01748df19b05d
--- /dev/null
+++ b/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2012 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 "base/file_path.h"
+#include "base/path_service.h"
+#include "chrome/browser/extensions/extension_apitest.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/extensions/features/feature.h"
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NativeMessageBasic) {
+ // Override the user data dir to point to our native app.
+ extensions::Feature::ScopedCurrentChannel
+ current_channel(chrome::VersionInfo::CHANNEL_DEV);
+ FilePath test_user_data_dir;
+ ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_user_data_dir));
+ test_user_data_dir = test_user_data_dir.AppendASCII("native_messaging");
+ ASSERT_TRUE(PathService::Override(chrome::DIR_USER_DATA, test_user_data_dir));
+ ASSERT_TRUE(RunExtensionTest("native_messaging")) << message_;
+}

Powered by Google App Engine
This is Rietveld 408576698