| OLD | NEW |
| 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/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "base/process/process.h" | 6 #include "base/process/process.h" |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "content/public/test/test_browser_thread.h" | 9 #include "content/public/test/test_browser_thread.h" |
| 10 #include "extensions/browser/extension_function.h" | 10 #include "extensions/browser/extension_function.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } // namespace | 121 } // namespace |
| 122 | 122 |
| 123 class QuotaServiceTest : public testing::Test { | 123 class QuotaServiceTest : public testing::Test { |
| 124 public: | 124 public: |
| 125 QuotaServiceTest() | 125 QuotaServiceTest() |
| 126 : extension_a_("a"), | 126 : extension_a_("a"), |
| 127 extension_b_("b"), | 127 extension_b_("b"), |
| 128 extension_c_("c"), | 128 extension_c_("c"), |
| 129 loop_(), | 129 loop_(), |
| 130 ui_thread_(BrowserThread::UI, &loop_) {} | 130 ui_thread_(BrowserThread::UI, &loop_) {} |
| 131 virtual void SetUp() { service_.reset(new QuotaService()); } | 131 void SetUp() override { service_.reset(new QuotaService()); } |
| 132 virtual void TearDown() { | 132 void TearDown() override { |
| 133 loop_.RunUntilIdle(); | 133 loop_.RunUntilIdle(); |
| 134 service_.reset(); | 134 service_.reset(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 protected: | 137 protected: |
| 138 std::string extension_a_; | 138 std::string extension_a_; |
| 139 std::string extension_b_; | 139 std::string extension_b_; |
| 140 std::string extension_c_; | 140 std::string extension_c_; |
| 141 scoped_ptr<QuotaService> service_; | 141 scoped_ptr<QuotaService> service_; |
| 142 base::MessageLoop loop_; | 142 base::MessageLoop loop_; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 "", | 407 "", |
| 408 service_->Assess( | 408 service_->Assess( |
| 409 extension_a_, f.get(), &arg, kStartTime + TimeDelta::FromDays(1))); | 409 extension_a_, f.get(), &arg, kStartTime + TimeDelta::FromDays(1))); |
| 410 EXPECT_NE( | 410 EXPECT_NE( |
| 411 "", | 411 "", |
| 412 service_->Assess( | 412 service_->Assess( |
| 413 extension_a_, g.get(), &arg, kStartTime + TimeDelta::FromDays(1))); | 413 extension_a_, g.get(), &arg, kStartTime + TimeDelta::FromDays(1))); |
| 414 } | 414 } |
| 415 | 415 |
| 416 } // namespace extensions | 416 } // namespace extensions |
| OLD | NEW |