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

Side by Side Diff: net/websockets/websocket_stream_test.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/websockets/websocket_job_test.cc ('k') | sandbox/linux/bpf_dsl/policy_compiler.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/websockets/websocket_stream.h" 5 #include "net/websockets/websocket_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 public: 401 public:
402 // This enum should match with the enum in Delegate in websocket_stream.cc. 402 // This enum should match with the enum in Delegate in websocket_stream.cc.
403 enum HandshakeResult { 403 enum HandshakeResult {
404 INCOMPLETE, 404 INCOMPLETE,
405 CONNECTED, 405 CONNECTED,
406 FAILED, 406 FAILED,
407 NUM_HANDSHAKE_RESULT_TYPES, 407 NUM_HANDSHAKE_RESULT_TYPES,
408 }; 408 };
409 409
410 class StreamCreation : public WebSocketStreamCreateTest { 410 class StreamCreation : public WebSocketStreamCreateTest {
411 virtual void TestBody() override {} 411 void TestBody() override {}
412 }; 412 };
413 413
414 scoped_ptr<base::HistogramSamples> GetSamples(const std::string& name) { 414 scoped_ptr<base::HistogramSamples> GetSamples(const std::string& name) {
415 base::HistogramBase* histogram = 415 base::HistogramBase* histogram =
416 base::StatisticsRecorder::FindHistogram(name); 416 base::StatisticsRecorder::FindHistogram(name);
417 return histogram ? histogram->SnapshotSamples() 417 return histogram ? histogram->SnapshotSamples()
418 : scoped_ptr<base::HistogramSamples>(); 418 : scoped_ptr<base::HistogramSamples>();
419 } 419 }
420 }; 420 };
421 421
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 if (original) { 1453 if (original) {
1454 samples->Subtract(*original); // Cancel the original values. 1454 samples->Subtract(*original); // Cancel the original values.
1455 } 1455 }
1456 EXPECT_EQ(1, samples->GetCount(INCOMPLETE)); 1456 EXPECT_EQ(1, samples->GetCount(INCOMPLETE));
1457 EXPECT_EQ(0, samples->GetCount(CONNECTED)); 1457 EXPECT_EQ(0, samples->GetCount(CONNECTED));
1458 EXPECT_EQ(0, samples->GetCount(FAILED)); 1458 EXPECT_EQ(0, samples->GetCount(FAILED));
1459 } 1459 }
1460 1460
1461 } // namespace 1461 } // namespace
1462 } // namespace net 1462 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_job_test.cc ('k') | sandbox/linux/bpf_dsl/policy_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698