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

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

Issue 12096107: Revert 180093 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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_case.h ('k') | no next file » | 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 458
459 std::string TestWebSocket::TestValidConnect() { 459 std::string TestWebSocket::TestValidConnect() {
460 int32_t result; 460 int32_t result;
461 PP_Resource ws = Connect(GetFullURL(kEchoServerURL), &result, ""); 461 PP_Resource ws = Connect(GetFullURL(kEchoServerURL), &result, "");
462 ASSERT_TRUE(ws); 462 ASSERT_TRUE(ws);
463 ASSERT_EQ(PP_OK, result); 463 ASSERT_EQ(PP_OK, result);
464 PP_Var extensions = websocket_interface_->GetExtensions(ws); 464 PP_Var extensions = websocket_interface_->GetExtensions(ws);
465 ASSERT_TRUE(AreEqualWithString(extensions, "")); 465 ASSERT_TRUE(AreEqualWithString(extensions, ""));
466 core_interface_->ReleaseResource(ws); 466 core_interface_->ReleaseResource(ws);
467 ReleaseVar(extensions);
468 467
469 PASS(); 468 PASS();
470 } 469 }
471 470
472 std::string TestWebSocket::TestInvalidClose() { 471 std::string TestWebSocket::TestInvalidClose() {
473 PP_Var reason = CreateVarString("close for test"); 472 PP_Var reason = CreateVarString("close for test");
474 TestCompletionCallback callback(instance_->pp_instance(), callback_type()); 473 TestCompletionCallback callback(instance_->pp_instance(), callback_type());
475 TestCompletionCallback async_callback(instance_->pp_instance(), PP_REQUIRED); 474 TestCompletionCallback async_callback(instance_->pp_instance(), PP_REQUIRED);
476 475
477 // Close before connect. 476 // Close before connect.
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 size_t last_event = events_on_closed - 1; 1504 size_t last_event = events_on_closed - 1;
1506 for (uint32_t i = 1; i < last_event; ++i) { 1505 for (uint32_t i = 1; i < last_event; ++i) {
1507 ASSERT_EQ(WebSocketEvent::EVENT_MESSAGE, events[i].event_type); 1506 ASSERT_EQ(WebSocketEvent::EVENT_MESSAGE, events[i].event_type);
1508 ASSERT_TRUE(AreEqualWithString(events[i].var.pp_var(), message)); 1507 ASSERT_TRUE(AreEqualWithString(events[i].var.pp_var(), message));
1509 } 1508 }
1510 ASSERT_EQ(WebSocketEvent::EVENT_CLOSE, events[last_event].event_type); 1509 ASSERT_EQ(WebSocketEvent::EVENT_CLOSE, events[last_event].event_type);
1511 ASSERT_TRUE(events[last_event].was_clean); 1510 ASSERT_TRUE(events[last_event].was_clean);
1512 1511
1513 PASS(); 1512 PASS();
1514 } 1513 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_case.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698