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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp

Issue 2432883002: Replaced PassRefPtr copies with moves in unit tests. (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/websockets/DOMWebSocket.h" 5 #include "modules/websockets/DOMWebSocket.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/core/v8/V8BindingForTesting.h" 9 #include "bindings/core/v8/V8BindingForTesting.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public: 42 public:
43 static MockWebSocketChannel* create() { 43 static MockWebSocketChannel* create() {
44 return new testing::StrictMock<MockWebSocketChannel>(); 44 return new testing::StrictMock<MockWebSocketChannel>();
45 } 45 }
46 46
47 ~MockWebSocketChannel() override {} 47 ~MockWebSocketChannel() override {}
48 48
49 MOCK_METHOD2(connect, bool(const KURL&, const String&)); 49 MOCK_METHOD2(connect, bool(const KURL&, const String&));
50 MOCK_METHOD1(send, void(const CString&)); 50 MOCK_METHOD1(send, void(const CString&));
51 MOCK_METHOD3(send, void(const DOMArrayBuffer&, unsigned, unsigned)); 51 MOCK_METHOD3(send, void(const DOMArrayBuffer&, unsigned, unsigned));
52 MOCK_METHOD1(send, void(PassRefPtr<BlobDataHandle>)); 52 MOCK_METHOD1(sendMock, void(BlobDataHandle*));
53 void send(PassRefPtr<BlobDataHandle> handle) { sendMock(handle.get()); }
53 MOCK_METHOD1(sendTextAsCharVectorMock, void(Vector<char>*)); 54 MOCK_METHOD1(sendTextAsCharVectorMock, void(Vector<char>*));
54 void sendTextAsCharVector(std::unique_ptr<Vector<char>> vector) { 55 void sendTextAsCharVector(std::unique_ptr<Vector<char>> vector) {
55 sendTextAsCharVectorMock(vector.get()); 56 sendTextAsCharVectorMock(vector.get());
56 } 57 }
57 MOCK_METHOD1(sendBinaryAsCharVectorMock, void(Vector<char>*)); 58 MOCK_METHOD1(sendBinaryAsCharVectorMock, void(Vector<char>*));
58 void sendBinaryAsCharVector(std::unique_ptr<Vector<char>> vector) { 59 void sendBinaryAsCharVector(std::unique_ptr<Vector<char>> vector) {
59 sendBinaryAsCharVectorMock(vector.get()); 60 sendBinaryAsCharVectorMock(vector.get());
60 } 61 }
61 MOCK_CONST_METHOD0(bufferedAmount, unsigned()); 62 MOCK_CONST_METHOD0(bufferedAmount, unsigned());
62 MOCK_METHOD2(close, void(int, const String&)); 63 MOCK_METHOD2(close, void(int, const String&));
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } 881 }
881 882
882 INSTANTIATE_TEST_CASE_P( 883 INSTANTIATE_TEST_CASE_P(
883 DOMWebSocketInvalidClosingCode, 884 DOMWebSocketInvalidClosingCode,
884 DOMWebSocketInvalidClosingCodeTest, 885 DOMWebSocketInvalidClosingCodeTest,
885 ::testing::Values(0, 1, 998, 999, 1001, 2999, 5000, 9999, 65535)); 886 ::testing::Values(0, 1, 998, 999, 1001, 2999, 5000, 9999, 65535));
886 887
887 } // namespace 888 } // namespace
888 889
889 } // namespace blink 890 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp ('k') | third_party/WebKit/Source/platform/PODFreeListArena.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698