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

Side by Side Diff: chrome/browser/extensions/extensions_quota_service_unittest.cc

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop.h"
5 #include "base/stl_util.h" 6 #include "base/stl_util.h"
6 #include "base/string_util.h" 7 #include "base/string_util.h"
7 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
8 #include "chrome/browser/extensions/extensions_quota_service.h" 9 #include "chrome/browser/extensions/extensions_quota_service.h"
9 #include "content/test/test_browser_thread.h" 10 #include "content/test/test_browser_thread.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 using base::TimeDelta; 13 using base::TimeDelta;
13 using base::TimeTicks; 14 using base::TimeTicks;
14 using content::BrowserThread; 15 using content::BrowserThread;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, 311 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg,
311 kStartTime + TimeDelta::FromSeconds(15))); 312 kStartTime + TimeDelta::FromSeconds(15)));
312 313
313 // We don't allow this extension to use quota limited functions even if they 314 // We don't allow this extension to use quota limited functions even if they
314 // wait a while. 315 // wait a while.
315 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, 316 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg,
316 kStartTime + TimeDelta::FromDays(1))); 317 kStartTime + TimeDelta::FromDays(1)));
317 EXPECT_FALSE(service_->Assess(extension_a_, g, &arg, 318 EXPECT_FALSE(service_->Assess(extension_a_, g, &arg,
318 kStartTime + TimeDelta::FromDays(1))); 319 kStartTime + TimeDelta::FromDays(1)));
319 } 320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698