OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/extensions/api/declarative/declarative_rule.h" | 5 #include "chrome/browser/extensions/api/declarative/declarative_rule.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/test/values_test_util.h" | 8 #include "base/test/values_test_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/extensions/matcher/url_matcher_constants.h" | 10 #include "extensions/common/matcher/url_matcher_constants.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 using base::test::ParseJson; | 16 using base::test::ParseJson; |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 template<typename T> | 20 template<typename T> |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 " \"priority\": 200 \n" | 384 " \"priority\": 200 \n" |
385 "}"), | 385 "}"), |
386 json_rule.get())); | 386 json_rule.get())); |
387 rule = Rule::Create(matcher.condition_factory(), kExtensionId, base::Time(), | 387 rule = Rule::Create(matcher.condition_factory(), kExtensionId, base::Time(), |
388 json_rule, &AtLeastOneCondition, &error); | 388 json_rule, &AtLeastOneCondition, &error); |
389 EXPECT_FALSE(rule); | 389 EXPECT_FALSE(rule); |
390 EXPECT_EQ("No conditions", error); | 390 EXPECT_EQ("No conditions", error); |
391 } | 391 } |
392 | 392 |
393 } // namespace extensions | 393 } // namespace extensions |
OLD | NEW |