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

Side by Side Diff: net/cookies/cookie_constants_unittest.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 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
« no previous file with comments | « net/cert/x509_cert_types_win.cc ('k') | net/cookies/cookie_monster_perftest.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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "net/cookies/cookie_constants.h" 6 #include "net/cookies/cookie_constants.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 13 matching lines...) Expand all
24 EXPECT_EQ(COOKIE_PRIORITY_HIGH, StringToCookiePriority("hiGH")); 24 EXPECT_EQ(COOKIE_PRIORITY_HIGH, StringToCookiePriority("hiGH"));
25 25
26 // Value of default priority. 26 // Value of default priority.
27 EXPECT_EQ(COOKIE_PRIORITY_DEFAULT, COOKIE_PRIORITY_MEDIUM); 27 EXPECT_EQ(COOKIE_PRIORITY_DEFAULT, COOKIE_PRIORITY_MEDIUM);
28 28
29 // Numeric values. 29 // Numeric values.
30 EXPECT_LT(COOKIE_PRIORITY_LOW, COOKIE_PRIORITY_MEDIUM); 30 EXPECT_LT(COOKIE_PRIORITY_LOW, COOKIE_PRIORITY_MEDIUM);
31 EXPECT_LT(COOKIE_PRIORITY_MEDIUM, COOKIE_PRIORITY_HIGH); 31 EXPECT_LT(COOKIE_PRIORITY_MEDIUM, COOKIE_PRIORITY_HIGH);
32 32
33 // Unrecognized tokens are interpreted as COOKIE_PRIORITY_DEFAULT. 33 // Unrecognized tokens are interpreted as COOKIE_PRIORITY_DEFAULT.
34 const char* bad_tokens[] = {"", "lo", "lowerest", "high ", " high", "0"}; 34 const char* const bad_tokens[] = {
35 "", "lo", "lowerest", "high ", " high", "0"};
35 for (size_t i = 0; i < arraysize(bad_tokens); ++i) { 36 for (size_t i = 0; i < arraysize(bad_tokens); ++i) {
36 EXPECT_EQ(COOKIE_PRIORITY_DEFAULT, StringToCookiePriority(bad_tokens[i])); 37 EXPECT_EQ(COOKIE_PRIORITY_DEFAULT, StringToCookiePriority(bad_tokens[i]));
37 } 38 }
38 } 39 }
39 40
40 } // namespace net 41 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_cert_types_win.cc ('k') | net/cookies/cookie_monster_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698