| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
| 16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
| 17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/test/test_timeouts.h" | 19 #include "base/test/test_timeouts.h" |
| 20 #include "base/threading/platform_thread.h" | 20 #include "base/threading/platform_thread.h" |
| 21 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
| 22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
| 23 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h" | 23 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h" |
| 24 #include "chrome/browser/extensions/api/messaging/native_messaging_test_util.h" | 24 #include "chrome/browser/extensions/api/messaging/native_messaging_test_util.h" |
| 25 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h" | 25 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h" |
| 26 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/chrome_version_info.h" | 28 #include "chrome/common/chrome_version_info.h" |
| 29 #include "chrome/common/extensions/extension.h" | |
| 30 #include "chrome/common/extensions/features/feature_channel.h" | 29 #include "chrome/common/extensions/features/feature_channel.h" |
| 31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/test/test_browser_thread_bundle.h" | 31 #include "content/public/test/test_browser_thread_bundle.h" |
| 32 #include "extensions/common/extension.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 | 34 |
| 35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 36 #include <windows.h> | 36 #include <windows.h> |
| 37 #include "base/win/scoped_handle.h" | 37 #include "base/win/scoped_handle.h" |
| 38 #else | 38 #else |
| 39 #include <unistd.h> | 39 #include <unistd.h> |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 using content::BrowserThread; | 42 using content::BrowserThread; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 read_message_run_loop_->Run(); | 291 read_message_run_loop_->Run(); |
| 292 EXPECT_TRUE(last_message_parsed_->GetInteger("id", &id)); | 292 EXPECT_TRUE(last_message_parsed_->GetInteger("id", &id)); |
| 293 EXPECT_EQ(2, id); | 293 EXPECT_EQ(2, id); |
| 294 EXPECT_TRUE(last_message_parsed_->GetString("echo.foo", &text)); | 294 EXPECT_TRUE(last_message_parsed_->GetString("echo.foo", &text)); |
| 295 EXPECT_EQ("bar", text); | 295 EXPECT_EQ("bar", text); |
| 296 EXPECT_TRUE(last_message_parsed_->GetString("caller_url", &url)); | 296 EXPECT_TRUE(last_message_parsed_->GetString("caller_url", &url)); |
| 297 EXPECT_EQ(expected_url, url); | 297 EXPECT_EQ(expected_url, url); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace extensions | 300 } // namespace extensions |
| OLD | NEW |