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

Side by Side Diff: ppapi/tests/test_websocket.cc

Issue 24579003: Clean up remaining unused globals (on mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: staticmedia Created 7 years, 2 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
« no previous file with comments | « ppapi/tests/test_tcp_server_socket_private.cc ('k') | remoting/base/auto_thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ppapi/tests/test_websocket.h" 5 #include "ppapi/tests/test_websocket.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 29 matching lines...) Expand all
40 const char kProtocolTestServerURL[] = "protocol-test?protocol="; 40 const char kProtocolTestServerURL[] = "protocol-test?protocol=";
41 41
42 const char* const kInvalidURLs[] = { 42 const char* const kInvalidURLs[] = {
43 "http://www.google.com/invalid_scheme", 43 "http://www.google.com/invalid_scheme",
44 "ws://www.google.com/invalid#fragment", 44 "ws://www.google.com/invalid#fragment",
45 "ws://www.google.com:65535/invalid_port", 45 "ws://www.google.com:65535/invalid_port",
46 NULL 46 NULL
47 }; 47 };
48 48
49 // Internal packet sizes. 49 // Internal packet sizes.
50 const uint64_t kCloseFrameSize = 6;
51 const uint64_t kMessageFrameOverhead = 6; 50 const uint64_t kMessageFrameOverhead = 6;
52 51
53 namespace { 52 namespace {
54 53
55 struct WebSocketEvent { 54 struct WebSocketEvent {
56 enum EventType { 55 enum EventType {
57 EVENT_OPEN, 56 EVENT_OPEN,
58 EVENT_MESSAGE, 57 EVENT_MESSAGE,
59 EVENT_ERROR, 58 EVENT_ERROR,
60 EVENT_CLOSE 59 EVENT_CLOSE
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 size_t last_event = events_on_closed - 1; 1576 size_t last_event = events_on_closed - 1;
1578 for (uint32_t i = 1; i < last_event; ++i) { 1577 for (uint32_t i = 1; i < last_event; ++i) {
1579 ASSERT_EQ(WebSocketEvent::EVENT_MESSAGE, events[i].event_type); 1578 ASSERT_EQ(WebSocketEvent::EVENT_MESSAGE, events[i].event_type);
1580 ASSERT_TRUE(AreEqualWithString(events[i].var.pp_var(), message)); 1579 ASSERT_TRUE(AreEqualWithString(events[i].var.pp_var(), message));
1581 } 1580 }
1582 ASSERT_EQ(WebSocketEvent::EVENT_CLOSE, events[last_event].event_type); 1581 ASSERT_EQ(WebSocketEvent::EVENT_CLOSE, events[last_event].event_type);
1583 ASSERT_TRUE(events[last_event].was_clean); 1582 ASSERT_TRUE(events[last_event].was_clean);
1584 1583
1585 PASS(); 1584 PASS();
1586 } 1585 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_tcp_server_socket_private.cc ('k') | remoting/base/auto_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698