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/values.h" | 5 #include "base/values.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/activity_actions.h" | 7 #include "chrome/browser/extensions/activity_log/activity_actions.h" |
8 #include "chrome/browser/extensions/activity_log/activity_log_policy.h" | 8 #include "chrome/browser/extensions/activity_log/activity_log_policy.h" |
9 #include "chrome/browser/extensions/activity_log/web_request_constants.h" | 9 #include "extensions/browser/api/activity_log/web_request_constants.h" |
10 #include "extensions/common/value_builder.h" | 10 #include "extensions/common/value_builder.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 class ActivityLogPolicyUtilTest : public testing::Test {}; | 15 class ActivityLogPolicyUtilTest : public testing::Test {}; |
16 | 16 |
17 // Test that incognito values are stripped, and non-incognito ones aren't. | 17 // Test that incognito values are stripped, and non-incognito ones aren't. |
18 TEST_F(ActivityLogPolicyUtilTest, StripPrivacySensitive) { | 18 TEST_F(ActivityLogPolicyUtilTest, StripPrivacySensitive) { |
19 scoped_refptr<Action> action = | 19 scoped_refptr<Action> action = |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 new Action("punky", | 87 new Action("punky", |
88 base::Time::Now(), | 88 base::Time::Now(), |
89 Action::ACTION_API_CALL, | 89 Action::ACTION_API_CALL, |
90 "tabs.executeScript"); | 90 "tabs.executeScript"); |
91 action->ParsePageUrl("<incognito>http://www.google.com/"); | 91 action->ParsePageUrl("<incognito>http://www.google.com/"); |
92 EXPECT_EQ("http://www.google.com/", action->page_url().spec()); | 92 EXPECT_EQ("http://www.google.com/", action->page_url().spec()); |
93 EXPECT_TRUE(action->page_incognito()); | 93 EXPECT_TRUE(action->page_incognito()); |
94 } | 94 } |
95 | 95 |
96 } // namespace extensions | 96 } // namespace extensions |
OLD | NEW |