| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |