OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/declarative_content/content_condition.h" | 5 #include "chrome/browser/extensions/api/declarative_content/content_condition.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/test/values_test_util.h" | 10 #include "base/test/values_test_util.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" | 12 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" |
13 #include "chrome/common/extensions/matcher/url_matcher.h" | 13 #include "extensions/common/matcher/url_matcher.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 namespace { | 18 namespace { |
19 | 19 |
20 using testing::ElementsAre; | 20 using testing::ElementsAre; |
21 using testing::HasSubstr; | 21 using testing::HasSubstr; |
22 | 22 |
23 TEST(DeclarativeContentConditionTest, ErroneousCondition) { | 23 TEST(DeclarativeContentConditionTest, ErroneousCondition) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 EXPECT_TRUE(result->IsFulfilled(match_data)); | 89 EXPECT_TRUE(result->IsFulfilled(match_data)); |
90 | 90 |
91 match_data.css_selectors.clear(); | 91 match_data.css_selectors.clear(); |
92 match_data.css_selectors.insert("body"); | 92 match_data.css_selectors.insert("body"); |
93 EXPECT_FALSE(result->IsFulfilled(match_data)); | 93 EXPECT_FALSE(result->IsFulfilled(match_data)); |
94 } | 94 } |
95 | 95 |
96 } // namespace | 96 } // namespace |
97 } // namespace extensions | 97 } // namespace extensions |
OLD | NEW |