Skip to content

Commit

Permalink
Remove PPB_Ext_Socket_Dev.
Browse files Browse the repository at this point in the history
BUG=366304,244653,312916,314899
TEST=None

Review URL: https://codereview.chromium.org/252923005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267348 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
yzshen@chromium.org committed Apr 30, 2014
1 parent 7ed04df commit 09bd7bc
Show file tree
Hide file tree
Showing 43 changed files with 92 additions and 4,795 deletions.
1 change: 0 additions & 1 deletion chrome/browser/component_updater/ppapi_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "ppapi/c/dev/ppb_view_dev.h"
#include "ppapi/c/dev/ppb_widget_dev.h"
#include "ppapi/c/dev/ppb_zoom_dev.h"
#include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h"
#include "ppapi/c/ppb_audio.h"
#include "ppapi/c/ppb_audio_buffer.h"
#include "ppapi/c/ppb_audio_config.h"
Expand Down
161 changes: 0 additions & 161 deletions chrome/browser/extensions/api/socket/socket_apitest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

#include "base/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/api/dns/mock_host_resolver_creator.h"
#include "chrome/browser/extensions/extension_apitest.h"
Expand All @@ -19,12 +18,6 @@
#include "net/dns/mock_host_resolver.h"
#include "net/test/spawned_test_server/spawned_test_server.h"

#if !defined(DISABLE_NACL)
#include "base/command_line.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "ppapi/shared_impl/ppapi_switches.h"
#endif

using extensions::Extension;

namespace utils = extension_function_test_utils;
Expand Down Expand Up @@ -61,50 +54,6 @@ class SocketApiTest : public ExtensionApiTest {
scoped_refptr<extensions::MockHostResolverCreator> resolver_creator_;
};

#if !defined(DISABLE_NACL)
// TODO(yzshen): Build testing framework for all extensions APIs in Pepper. And
// move these Pepper API tests there.
class SocketPpapiTest : public SocketApiTest {
public:
SocketPpapiTest() {
}
virtual ~SocketPpapiTest() {
}

virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
SocketApiTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kEnablePepperTesting);
}

virtual void SetUpOnMainThread() OVERRIDE {
SocketApiTest::SetUpOnMainThread();

ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir_));
app_dir_ = app_dir_.AppendASCII("ppapi")
.AppendASCII("tests")
.AppendASCII("extensions")
.AppendASCII("socket")
.AppendASCII("newlib");
}

protected:
void LaunchTestingApp() {
const Extension* extension = LoadExtension(app_dir_);
ASSERT_TRUE(extension);

AppLaunchParams params(browser()->profile(),
extension,
extensions::LAUNCH_CONTAINER_NONE,
NEW_WINDOW);
params.command_line = *CommandLine::ForCurrentProcess();
OpenApplication(params);
}

private:
base::FilePath app_dir_;
};
#endif // !defined(DISABLE_NACL)

} // namespace

IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketUDPCreateGood) {
Expand Down Expand Up @@ -254,113 +203,3 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketMulticast) {

EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}

#if !defined(DISABLE_NACL)

// TODO(jschuh): Hanging plugin tests. crbug.com/244653
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
#define MAYBE_UDP DISABLED_UDP
#else
#define MAYBE_UDP UDP
#endif
IN_PROC_BROWSER_TEST_F(SocketPpapiTest, MAYBE_UDP) {
scoped_ptr<net::SpawnedTestServer> test_server(
new net::SpawnedTestServer(
net::SpawnedTestServer::TYPE_UDP_ECHO,
net::SpawnedTestServer::kLocalhost,
base::FilePath(FILE_PATH_LITERAL("net/data"))));
EXPECT_TRUE(test_server->Start());

net::HostPortPair host_port_pair = test_server->host_port_pair();
int port = host_port_pair.port();
ASSERT_GT(port, 0);

// Test that sendTo() is properly resolving hostnames.
host_port_pair.set_host("LOCALhost");

ResultCatcher catcher;
catcher.RestrictToProfile(browser()->profile());

ExtensionTestMessageListener listener("info_please", true);

LaunchTestingApp();

EXPECT_TRUE(listener.WaitUntilSatisfied());
listener.Reply(
base::StringPrintf("udp:%s:%d", host_port_pair.host().c_str(), port));

EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}

// TODO(jschuh): Hanging plugin tests. crbug.com/244653
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
#define MAYBE_TCP DISABLED_TCP
#else
#define MAYBE_TCP TCP
#endif
IN_PROC_BROWSER_TEST_F(SocketPpapiTest, MAYBE_TCP) {
scoped_ptr<net::SpawnedTestServer> test_server(
new net::SpawnedTestServer(
net::SpawnedTestServer::TYPE_TCP_ECHO,
net::SpawnedTestServer::kLocalhost,
base::FilePath(FILE_PATH_LITERAL("net/data"))));
EXPECT_TRUE(test_server->Start());

net::HostPortPair host_port_pair = test_server->host_port_pair();
int port = host_port_pair.port();
ASSERT_GT(port, 0);

// Test that connect() is properly resolving hostnames.
host_port_pair.set_host("lOcAlHoSt");

ResultCatcher catcher;
catcher.RestrictToProfile(browser()->profile());

ExtensionTestMessageListener listener("info_please", true);

LaunchTestingApp();

EXPECT_TRUE(listener.WaitUntilSatisfied());
listener.Reply(
base::StringPrintf("tcp:%s:%d", host_port_pair.host().c_str(), port));

EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}

// TODO(jschuh): Hanging plugin tests. crbug.com/244653
// Also fails on official Mac builds. See http://crbug.com/312916
#if (defined(OS_WIN) && defined(ARCH_CPU_X86_64)) || \
(defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD))
#define MAYBE_TCPServer DISABLED_TCPServer
#else
#define MAYBE_TCPServer TCPServer
#endif
IN_PROC_BROWSER_TEST_F(SocketPpapiTest, MAYBE_TCPServer) {
ResultCatcher catcher;
catcher.RestrictToProfile(browser()->profile());
ExtensionTestMessageListener listener("info_please", true);

LaunchTestingApp();

EXPECT_TRUE(listener.WaitUntilSatisfied());
listener.Reply(
base::StringPrintf("tcp_server:%s:%d", kHostname.c_str(), kPort));

EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}

// Disabled due to flakiness: http://crbug.com/314899
IN_PROC_BROWSER_TEST_F(SocketPpapiTest, DISABLED_Multicast) {
ResultCatcher catcher;
catcher.RestrictToProfile(browser()->profile());
ExtensionTestMessageListener listener("info_please", true);

LaunchTestingApp();

EXPECT_TRUE(listener.WaitUntilSatisfied());
listener.Reply(
base::StringPrintf("multicast:%s:%d", kHostname.c_str(), kPort));

EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
#endif
1 change: 0 additions & 1 deletion chrome/chrome_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,6 @@
'../ppapi/ppapi_nacl.gyp:ppapi_nacl_tests',
'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_background_keepalive',
'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_media_galleries',
'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_socket',
],
'conditions': [
['chromeos==1', {
Expand Down
1 change: 0 additions & 1 deletion content/renderer/pepper/plugin_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "ppapi/c/dev/ppb_view_dev.h"
#include "ppapi/c/dev/ppb_widget_dev.h"
#include "ppapi/c/dev/ppb_zoom_dev.h"
#include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
Expand Down
2 changes: 0 additions & 2 deletions native_client_sdk/src/build_tools/sdk_files.list
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@ include/pnacl/netinet6/*
include/pnacl/sys/*
include/ppapi/c/*
include/ppapi/c/dev/*
include/ppapi/c/extensions/dev/*
include/ppapi/c/private/*
include/ppapi/cpp/*
include/ppapi/cpp/dev/*
include/ppapi/cpp/extensions/*
include/ppapi/cpp/private/*
include/ppapi/gles2/*
include/ppapi/lib/gl/gles2/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/size.h"
#include "ppapi/cpp/var_dictionary.h"
#include "ppapi/utility/completion_callback_factory.h"

// When compiling natively on Windows, min, max and PostMessage can be #define-d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/var.h"
#include "ppapi/cpp/var_dictionary.h"
#include "ppapi/cpp/video_frame.h"
#include "ppapi/lib/gl/gles2/gl2ext_ppapi.h"
#include "ppapi/utility/completion_callback_factory.h"
Expand Down
6 changes: 0 additions & 6 deletions native_client_sdk/src/libraries/ppapi/library.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@
],
'DEST': 'include/ppapi/c/dev',
},
{
'FILES': [
'ppb_ext_socket_dev.h',
],
'DEST': 'include/ppapi/c/extensions/dev',
},
],
'DEST': 'src',
'NAME': 'ppapi',
Expand Down
21 changes: 0 additions & 21 deletions native_client_sdk/src/libraries/ppapi_cpp/library.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
'SEARCH': [
'../../../../ppapi/cpp',
'../../../../ppapi/cpp/dev',
'../../../../ppapi/cpp/extensions',
'../../../../ppapi/cpp/extensions/dev',
'../../../../ppapi/utility',
'../../../../ppapi/utility/graphics',
'../../../../ppapi/utility/threading',
Expand Down Expand Up @@ -75,9 +73,6 @@
'view_dev.cc',
'zoom_dev.cc',

# ppapi/cpp/extensions/dev
'socket_dev.cc',

# ppapi/utility/graphics
'paint_aggregator.cc',
'paint_manager.cc',
Expand Down Expand Up @@ -174,22 +169,6 @@
],
'DEST': 'include/ppapi/cpp/dev',
},
{
'FILES': [
'dict_field.h',
'ext_output_traits.h',
'from_var_converter.h',
'optional.h',
'to_var_converter.h',
],
'DEST': 'include/ppapi/cpp/extensions',
},
{
'FILES': [
'socket_dev.h',
],
'DEST': 'include/ppapi/cpp/extensions/dev',
},
{
'FILES': [
'completion_callback_factory.h',
Expand Down
2 changes: 2 additions & 0 deletions native_client_sdk/src/libraries/ppapi_simple/ps_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "ppapi/cpp/size.h"
#include "ppapi/cpp/touch_point.h"
#include "ppapi/cpp/var.h"
#include "ppapi/cpp/var_array.h"
#include "ppapi/cpp/var_dictionary.h"

#include "ppapi_simple/ps_event.h"
#include "ppapi_simple/ps_instance.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ def CheckTODO(input_api, output_api):
# Only examine public stable interfaces.
if name_parts[2] in ['dev', 'private', 'trusted']:
continue
if name_parts[2] == 'extensions' and name_parts[3] == 'dev':
continue

filepath = os.path.join('..', filename)
if RE_TODO.search(open(filepath, 'rb').read()):
Expand Down
Loading

0 comments on commit 09bd7bc

Please sign in to comment.