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

Unified Diff: chrome/common/extensions/user_script_unittest.cc

Issue 19624: Add early-injection capability to user scripts. I haven't yet (Closed)
Patch Set: Use new documentElementAvailable() callback Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/user_script.cc ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script_unittest.cc
diff --git a/chrome/common/extensions/user_script_unittest.cc b/chrome/common/extensions/user_script_unittest.cc
index 02662606d138f157db9d369f5421120a93cfd188..26bf355d063eebf8764ab1074e0439cff5969bd2 100644
--- a/chrome/common/extensions/user_script_unittest.cc
+++ b/chrome/common/extensions/user_script_unittest.cc
@@ -78,6 +78,7 @@ TEST(UserScriptTest, Pickle) {
UserScript script1;
script1.set_url(GURL("chrome-user-script:/foo.user.js"));
+ script1.set_run_location(UserScript::DOCUMENT_START);
script1.add_url_pattern(pattern1);
script1.add_url_pattern(pattern2);
@@ -99,3 +100,12 @@ TEST(UserScriptTest, Pickle) {
script2.url_patterns()[i].GetAsString());
}
}
+
+TEST(UserScriptTest, Defaults) {
Matt Perry 2009/02/11 19:28:46 Do these defaults need to be this way for compatib
+ UserScript script;
+ ASSERT_EQ(FILE_PATH_LITERAL(""), script.path().value());
+ ASSERT_EQ("", script.url().spec());
+ ASSERT_EQ(0, script.url_patterns().size());
+ ASSERT_EQ(0, script.globs().size());
+ ASSERT_EQ(UserScript::DOCUMENT_END, script.run_location());
+}
« no previous file with comments | « chrome/common/extensions/user_script.cc ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698