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

Side by Side Diff: chrome/common/extensions/user_script_unittest.cc

Issue 10696176: Move UserScript and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/pickle.h" 6 #include "base/pickle.h"
7 #include "chrome/common/extensions/user_script.h" 7 #include "chrome/common/extensions/user_script.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace extensions {
12
11 static const int kAllSchemes = 13 static const int kAllSchemes =
12 URLPattern::SCHEME_HTTP | 14 URLPattern::SCHEME_HTTP |
13 URLPattern::SCHEME_HTTPS | 15 URLPattern::SCHEME_HTTPS |
14 URLPattern::SCHEME_FILE | 16 URLPattern::SCHEME_FILE |
15 URLPattern::SCHEME_FTP | 17 URLPattern::SCHEME_FTP |
16 URLPattern::SCHEME_CHROMEUI; 18 URLPattern::SCHEME_CHROMEUI;
17 19
18 TEST(ExtensionUserScriptTest, Glob_HostString) { 20 TEST(ExtensionUserScriptTest, Glob_HostString) {
19 UserScript script; 21 UserScript script;
20 script.add_glob("*mail.google.com*"); 22 script.add_glob("*mail.google.com*");
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 209 }
208 210
209 ASSERT_EQ(script1.url_patterns(), script2.url_patterns()); 211 ASSERT_EQ(script1.url_patterns(), script2.url_patterns());
210 ASSERT_EQ(script1.exclude_url_patterns(), script2.exclude_url_patterns()); 212 ASSERT_EQ(script1.exclude_url_patterns(), script2.exclude_url_patterns());
211 } 213 }
212 214
213 TEST(ExtensionUserScriptTest, Defaults) { 215 TEST(ExtensionUserScriptTest, Defaults) {
214 UserScript script; 216 UserScript script;
215 ASSERT_EQ(UserScript::DOCUMENT_IDLE, script.run_location()); 217 ASSERT_EQ(UserScript::DOCUMENT_IDLE, script.run_location());
216 } 218 }
219
220 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698