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

Unified Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
index f94491934e013e1218731b6381a380f1f652722f..b35515d994d4c4a9916120a378ffd4f9830ce4be 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
@@ -348,7 +348,7 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBuffer)
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- RefPtr<DOMArrayBuffer> fooBuffer = DOMArrayBuffer::create("foo", 3);
+ DOMArrayBuffer* fooBuffer = DOMArrayBuffer::create("foo", 3);
channel()->send(*fooBuffer, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -368,8 +368,8 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBufferPartial)
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- RefPtr<DOMArrayBuffer> foobarBuffer = DOMArrayBuffer::create("foobar", 6);
- RefPtr<DOMArrayBuffer> qbazuxBuffer = DOMArrayBuffer::create("qbazux", 6);
+ DOMArrayBuffer* foobarBuffer = DOMArrayBuffer::create("foobar", 6);
+ DOMArrayBuffer* qbazuxBuffer = DOMArrayBuffer::create("qbazux", 6);
channel()->send(*foobarBuffer, 0, 3);
channel()->send(*foobarBuffer, 3, 3);
channel()->send(*qbazuxBuffer, 1, 3);
@@ -393,19 +393,19 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBufferWithNullBytes)
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
{
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\0ar", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("\0ar", 3);
channel()->send(*b, 0, 3);
}
{
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("b\0z", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("b\0z", 3);
channel()->send(*b, 0, 3);
}
{
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("qu\0", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("qu\0", 3);
channel()->send(*b, 0, 3);
}
{
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\0\0\0", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("\0\0\0", 3);
channel()->send(*b, 0, 3);
}
@@ -420,7 +420,7 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBufferNonLatin1UTF8)
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\xe7\x8b\x90", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("\xe7\x8b\x90", 3);
channel()->send(*b, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -434,7 +434,7 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBufferNonUTF8)
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\x80\xff\xe7", 3);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("\x80\xff\xe7", 3);
channel()->send(*b, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -454,7 +454,7 @@ TEST_F(DocumentWebSocketChannelTest, sendBinaryInArrayBufferNonLatin1UTF8Continu
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90", 18);
+ DOMArrayBuffer* b = DOMArrayBuffer::create("\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90", 18);
channel()->send(*b, 0, 18);
checkpoint.Call(1);

Powered by Google App Engine
This is Rietveld 408576698