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

Side by Side Diff: chrome/browser/extensions/activity_log/uma_policy_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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
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/time/time.h" 5 #include "base/time/time.h"
6 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" 6 #include "chrome/browser/extensions/activity_log/activity_action_constants.h"
7 #include "chrome/browser/extensions/activity_log/uma_policy.h" 7 #include "chrome/browser/extensions/activity_log/uma_policy.h"
8 #include "chrome/test/base/testing_profile.h" 8 #include "chrome/test/base/testing_profile.h"
9 #include "content/public/test/test_browser_thread_bundle.h"
9 #include "extensions/common/dom_action_types.h" 10 #include "extensions/common/dom_action_types.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace extensions { 13 namespace extensions {
13 14
14 class UmaPolicyTest : public testing::Test { 15 class UmaPolicyTest : public testing::Test {
15 public: 16 public:
16 UmaPolicyTest() { 17 UmaPolicyTest() {
17 profile_.reset(new TestingProfile()); 18 profile_.reset(new TestingProfile());
18 } 19 }
19 20
20 protected: 21 protected:
22 content::TestBrowserThreadBundle thread_bundle_;
21 scoped_ptr<TestingProfile> profile_; 23 scoped_ptr<TestingProfile> profile_;
22 }; 24 };
23 25
24 TEST_F(UmaPolicyTest, Construct) { 26 TEST_F(UmaPolicyTest, Construct) {
25 ActivityLogPolicy* policy = new UmaPolicy(profile_.get()); 27 ActivityLogPolicy* policy = new UmaPolicy(profile_.get());
26 policy->Close(); 28 policy->Close();
27 } 29 }
28 30
29 TEST_F(UmaPolicyTest, MatchActionToStatusTest) { 31 TEST_F(UmaPolicyTest, MatchActionToStatusTest) {
30 UmaPolicy* policy = new UmaPolicy(profile_.get()); 32 UmaPolicy* policy = new UmaPolicy(profile_.get());
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 UmaPolicy::CleanURL(GURL("http://www.cnn.com"))); 218 UmaPolicy::CleanURL(GURL("http://www.cnn.com")));
217 ASSERT_EQ("http://www.cnn.com/", 219 ASSERT_EQ("http://www.cnn.com/",
218 UmaPolicy::CleanURL(GURL("http://www.cnn.com/#a"))); 220 UmaPolicy::CleanURL(GURL("http://www.cnn.com/#a")));
219 ASSERT_EQ("http://www.cnn.com/", 221 ASSERT_EQ("http://www.cnn.com/",
220 UmaPolicy::CleanURL(GURL("http://www.cnn.com/#aaaa"))); 222 UmaPolicy::CleanURL(GURL("http://www.cnn.com/#aaaa")));
221 ASSERT_EQ("http://www.cnn.com/?q=a", 223 ASSERT_EQ("http://www.cnn.com/?q=a",
222 UmaPolicy::CleanURL(GURL("http://www.cnn.com/?q=a"))); 224 UmaPolicy::CleanURL(GURL("http://www.cnn.com/?q=a")));
223 } 225 }
224 226
225 } // namespace extensions 227 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698