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

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

Issue 2930033002: Renable CookieMonsterTest.TestAddCookieOnManyHosts (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <memory> 6 #include <memory>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 getCookiesCallback.GetCookies(cm.get(), GURL(kGoogleURL)); 147 getCookiesCallback.GetCookies(cm.get(), GURL(kGoogleURL));
148 } 148 }
149 timer2.Done(); 149 timer2.Done();
150 150
151 base::PerfTimeLogger timer3("Cookie_monster_deleteall_single_host"); 151 base::PerfTimeLogger timer3("Cookie_monster_deleteall_single_host");
152 cm->DeleteAllAsync(CookieMonster::DeleteCallback()); 152 cm->DeleteAllAsync(CookieMonster::DeleteCallback());
153 base::RunLoop().RunUntilIdle(); 153 base::RunLoop().RunUntilIdle();
154 timer3.Done(); 154 timer3.Done();
155 } 155 }
156 156
157 // TODO(xunjieli): Renable after crbug.com/730000 is fixed. 157 TEST_F(CookieMonsterTest, TestAddCookieOnManyHosts) {
158 TEST_F(CookieMonsterTest, DISABLED_TestAddCookieOnManyHosts) {
159 std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr)); 158 std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
160 std::string cookie(kCookieLine); 159 std::string cookie(kCookieLine);
161 std::vector<GURL> gurls; // just wanna have ffffuunnn 160 std::vector<GURL> gurls; // just wanna have ffffuunnn
162 for (int i = 0; i < kNumCookies; ++i) { 161 for (int i = 0; i < kNumCookies; ++i) {
163 gurls.push_back(GURL(base::StringPrintf("https://a%04d.izzle", i))); 162 gurls.push_back(GURL(base::StringPrintf("https://a%04d.izzle", i)));
164 } 163 }
165 164
166 SetCookieCallback setCookieCallback; 165 SetCookieCallback setCookieCallback;
167 166
168 // Add a cookie on a bunch of host 167 // Add a cookie on a bunch of host
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 setCookieCallback.SetCookie(cm.get(), gurl, cookie_line); 382 setCookieCallback.SetCookie(cm.get(), gurl, cookie_line);
384 383
385 base::PerfTimeLogger timer((std::string("GC_") + test_case.name).c_str()); 384 base::PerfTimeLogger timer((std::string("GC_") + test_case.name).c_str());
386 for (int i = 0; i < kNumCookies; i++) 385 for (int i = 0; i < kNumCookies; i++)
387 setCookieCallback.SetCookie(cm.get(), gurl, cookie_line); 386 setCookieCallback.SetCookie(cm.get(), gurl, cookie_line);
388 timer.Done(); 387 timer.Done();
389 } 388 }
390 } 389 }
391 390
392 } // namespace net 391 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698