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

Side by Side Diff: Source/modules/websockets/WebSocketExtensionDispatcherTest.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/modules/mediastream/RTCPeerConnection.cpp ('k') | Source/web/PageOverlayList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 HashMap<String, String> parameters; 116 HashMap<String, String> parameters;
117 } expected[2]; 117 } expected[2];
118 expected[0].token = "mux"; 118 expected[0].token = "mux";
119 expected[0].parameters.add("max-channels", "4"); 119 expected[0].parameters.add("max-channels", "4");
120 expected[0].parameters.add("flow-control", String()); 120 expected[0].parameters.add("flow-control", String());
121 expected[1].token = "deflate-frame"; 121 expected[1].token = "deflate-frame";
122 122
123 addMockProcessor("mux"); 123 addMockProcessor("mux");
124 addMockProcessor("deflate-frame"); 124 addMockProcessor("deflate-frame");
125 EXPECT_TRUE(m_extensions.processHeaderValue("mux ; max-channels =4;flow-con trol, deflate-frame ")); 125 EXPECT_TRUE(m_extensions.processHeaderValue("mux ; max-channels =4;flow-con trol, deflate-frame "));
126 EXPECT_TRUE(m_extensions.acceptedExtensions().find("mux") != notFound); 126 EXPECT_TRUE(m_extensions.acceptedExtensions().find("mux") != kNotFound);
127 EXPECT_TRUE(m_extensions.acceptedExtensions().find("deflate-frame") != notFo und); 127 EXPECT_TRUE(m_extensions.acceptedExtensions().find("deflate-frame") != kNotF ound);
128 for (size_t i = 0; i < sizeof(expected) / sizeof(expected[0]); ++i) { 128 for (size_t i = 0; i < sizeof(expected) / sizeof(expected[0]); ++i) {
129 EXPECT_EQ(expected[i].token, m_parsedExtensionTokens[i]); 129 EXPECT_EQ(expected[i].token, m_parsedExtensionTokens[i]);
130 const HashMap<String, String>& expectedParameters = expected[i].paramete rs; 130 const HashMap<String, String>& expectedParameters = expected[i].paramete rs;
131 const HashMap<String, String>& parsedParameters = m_parsedParameters[i]; 131 const HashMap<String, String>& parsedParameters = m_parsedParameters[i];
132 EXPECT_EQ(expected[i].parameters.size(), m_parsedParameters[i].size()); 132 EXPECT_EQ(expected[i].parameters.size(), m_parsedParameters[i].size());
133 for (HashMap<String, String>::const_iterator iterator = expectedParamete rs.begin(); iterator != expectedParameters.end(); ++iterator) { 133 for (HashMap<String, String>::const_iterator iterator = expectedParamete rs.begin(); iterator != expectedParameters.end(); ++iterator) {
134 HashMap<String, String>::const_iterator parsed = parsedParameters.fi nd(iterator->key); 134 HashMap<String, String>::const_iterator parsed = parsedParameters.fi nd(iterator->key);
135 EXPECT_TRUE(parsed != parsedParameters.end()); 135 EXPECT_TRUE(parsed != parsedParameters.end());
136 if (iterator->value.isNull()) 136 if (iterator->value.isNull())
137 EXPECT_TRUE(parsed->value.isNull()); 137 EXPECT_TRUE(parsed->value.isNull());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 for (size_t i = 0; i < sizeof(inputs) / sizeof(inputs[0]); ++i) { 175 for (size_t i = 0; i < sizeof(inputs) / sizeof(inputs[0]); ++i) {
176 m_extensions.reset(); 176 m_extensions.reset();
177 addMockProcessor("x-foo"); 177 addMockProcessor("x-foo");
178 addMockProcessor("x-bar"); 178 addMockProcessor("x-bar");
179 EXPECT_FALSE(m_extensions.processHeaderValue(inputs[i])); 179 EXPECT_FALSE(m_extensions.processHeaderValue(inputs[i]));
180 EXPECT_TRUE(m_extensions.acceptedExtensions().isNull()); 180 EXPECT_TRUE(m_extensions.acceptedExtensions().isNull());
181 } 181 }
182 } 182 }
183 183
184 } 184 }
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCPeerConnection.cpp ('k') | Source/web/PageOverlayList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698