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

Side by Side Diff: extensions/browser/api/cast_channel/cast_channel_apitest.cc

Issue 395333003: Extensions: Move cast_channel and hid APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "chrome/browser/extensions/api/cast_channel/cast_channel_api.h"
9 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
11 #include "chrome/browser/extensions/extension_function_test_utils.h" 9 #include "chrome/browser/extensions/extension_function_test_utils.h"
12 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
14 #include "chrome/common/extensions/api/cast_channel.h"
15 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "extensions/browser/api/cast_channel/cast_channel_api.h"
14 #include "extensions/browser/api/cast_channel/cast_socket.h"
15 #include "extensions/common/api/cast_channel.h"
16 #include "extensions/common/switches.h" 16 #include "extensions/common/switches.h"
17 #include "net/base/capturing_net_log.h" 17 #include "net/base/capturing_net_log.h"
18 #include "net/base/completion_callback.h" 18 #include "net/base/completion_callback.h"
19 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gmock_mutant.h" 21 #include "testing/gmock_mutant.h"
22 22
23 namespace cast_channel = extensions::api::cast_channel; 23 namespace cast_channel = extensions::core_api::cast_channel;
24 using cast_channel::CastSocket; 24 using cast_channel::CastSocket;
25 using cast_channel::ChannelError; 25 using cast_channel::ChannelError;
26 using cast_channel::MessageInfo; 26 using cast_channel::MessageInfo;
27 using cast_channel::ReadyState; 27 using cast_channel::ReadyState;
28 using extensions::Extension; 28 using extensions::Extension;
29 29
30 namespace utils = extension_function_test_utils; 30 namespace utils = extension_function_test_utils;
31 31
32 using ::testing::_; 32 using ::testing::_;
33 using ::testing::A; 33 using ::testing::A;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 cast_channel_send_function.get(), 375 cast_channel_send_function.get(),
376 "[{\"channelId\": 1, \"url\": \"cast://127.0.0.1:8009\", " 376 "[{\"channelId\": 1, \"url\": \"cast://127.0.0.1:8009\", "
377 "\"connectInfo\": " 377 "\"connectInfo\": "
378 "{\"ipAddress\": \"127.0.0.1\", \"port\": 8009, " 378 "{\"ipAddress\": \"127.0.0.1\", \"port\": 8009, "
379 "\"auth\": \"ssl\"}, \"readyState\": \"open\"}, " 379 "\"auth\": \"ssl\"}, \"readyState\": \"open\"}, "
380 "{\"namespace_\": \"foo\", \"sourceId\": \"src\", " 380 "{\"namespace_\": \"foo\", \"sourceId\": \"src\", "
381 "\"destinationId\": \"\", \"data\": \"data\"}]", 381 "\"destinationId\": \"\", \"data\": \"data\"}]",
382 browser()); 382 browser());
383 EXPECT_EQ(error, "message_info.destination_id is required"); 383 EXPECT_EQ(error, "message_info.destination_id is required");
384 } 384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698