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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc

Issue 12092096: Move c/c/extensions/matcher/ to top level extension dir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TOT Created 7 years, 10 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 (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_webrequest/webrequest_rules_ registry.h" 5 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_ registry.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/test/values_test_util.h" 15 #include "base/test/values_test_util.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h" 17 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h"
18 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 18 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
19 #include "chrome/common/extensions/matcher/url_matcher_constants.h"
20 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 #include "extensions/common/matcher/url_matcher_constants.h"
21 #include "net/url_request/url_request_test_util.h" 21 #include "net/url_request/url_request_test_util.h"
22 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest-message.h" 23 #include "testing/gtest/include/gtest/gtest-message.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 25
26 namespace { 26 namespace {
27 const char kExtensionId[] = "ext1"; 27 const char kExtensionId[] = "ext1";
28 const char kExtensionId2[] = "ext2"; 28 const char kExtensionId2[] = "ext2";
29 const char kRuleId1[] = "rule1"; 29 const char kRuleId1[] = "rule1";
30 const char kRuleId2[] = "rule2"; 30 const char kRuleId2[] = "rule2";
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 new TestWebRequestRulesRegistry()); 587 new TestWebRequestRulesRegistry());
588 588
589 URLMatcher matcher; 589 URLMatcher matcher;
590 std::string error = registry->AddRulesImpl(kExtensionId, rules); 590 std::string error = registry->AddRulesImpl(kExtensionId, rules);
591 EXPECT_THAT(error, HasSubstr("no time in the request life-cycle")); 591 EXPECT_THAT(error, HasSubstr("no time in the request life-cycle"));
592 EXPECT_TRUE(registry->IsEmpty()); 592 EXPECT_TRUE(registry->IsEmpty());
593 } 593 }
594 594
595 595
596 } // namespace extensions 596 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698