Home | History | Annotate | Download | only in extensions

Lines Matching refs:script

19   UserScript script;
20 script.add_glob("*mail.google.com*");
21 script.add_glob("*mail.yahoo.com*");
22 script.add_glob("*mail.msn.com*");
23 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com")));
24 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com/foo")));
25 EXPECT_TRUE(script.MatchesUrl(GURL("https://mail.google.com/foo")));
26 EXPECT_TRUE(script.MatchesUrl(GURL("ftp://mail.google.com/foo")));
27 EXPECT_TRUE(script.MatchesUrl(GURL("http://woo.mail.google.com/foo")));
28 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.yahoo.com/bar")));
29 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.msn.com/baz")));
30 EXPECT_FALSE(script.MatchesUrl(GURL("http://www.hotmail.com")));
32 script.add_exclude_glob("*foo*");
33 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com")));
34 EXPECT_FALSE(script.MatchesUrl(GURL("http://mail.google.com/foo")));
38 UserScript script;
39 script.add_glob("*mail.google.com/");
41 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com")));
42 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com/")));
43 EXPECT_FALSE(script.MatchesUrl(GURL("http://mail.google.com/foo")));
47 UserScript script;
48 script.add_glob("http://mail.google.com/*");
50 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com")));
51 EXPECT_TRUE(script.MatchesUrl(GURL("http://mail.google.com/foo")));
52 EXPECT_FALSE(script.MatchesUrl(GURL("https://mail.google.com/foo")));
56 UserScript script;
57 script.add_glob("*");
58 EXPECT_TRUE(script.MatchesUrl(GURL("http://foo.com/bar")));
59 EXPECT_TRUE(script.MatchesUrl(GURL("http://hot.com/dog")));
60 EXPECT_TRUE(script.MatchesUrl(GURL("https://hot.com/dog")));
61 EXPECT_TRUE(script.MatchesUrl(GURL("file:///foo/bar")));
65 UserScript script;
66 script.add_glob("*foo*");
67 EXPECT_TRUE(script.MatchesUrl(GURL("http://foo.com/bar")));
68 EXPECT_TRUE(script.MatchesUrl(GURL("http://baz.org/foo/bar")));
69 EXPECT_FALSE(script.MatchesUrl(GURL("http://baz.org")));
77 UserScript script;
78 script.add_url_pattern(pattern);
79 EXPECT_TRUE(script.MatchesUrl(GURL("http://monkey.com/foobar")));
80 EXPECT_FALSE(script.MatchesUrl(GURL("http://monkey.com/hotdog")));
87 UserScript script;
93 script.add_url_pattern(pattern);
95 script.add_glob("*bar*");
98 EXPECT_FALSE(script.MatchesUrl(GURL("http://www.google.com/foo")));
100 script.add_exclude_glob("*baz*");
103 EXPECT_FALSE(script.MatchesUrl(GURL("http://www.google.com/baz")));
106 EXPECT_TRUE(script.MatchesUrl(GURL("http://www.google.com/bar")));
109 script.clear_globs();
110 EXPECT_TRUE(script.MatchesUrl(GURL("http://www.google.com/foo")));
113 script.clear_exclude_globs();
114 EXPECT_TRUE(script.MatchesUrl(GURL("http://www.google.com/foo")));
129 GURL("chrome-user-script:/foo.user.js")));
133 GURL("chrome-user-script:/foo.user.css")));
137 GURL("chrome-user-script:/foo2.user.css")));
170 UserScript script;
171 ASSERT_EQ(UserScript::DOCUMENT_IDLE, script.run_location());