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

Unified Diff: chrome/renderer/greasemonkey_slave_unittest.cc

Issue 17281: This is a rename of the term 'Greasemonkey' to 'user script' in Chromium. (Closed)
Patch Set: Fix indent Created 11 years, 11 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/renderer/greasemonkey_slave.cc ('k') | chrome/renderer/render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/greasemonkey_slave_unittest.cc
diff --git a/chrome/renderer/greasemonkey_slave_unittest.cc b/chrome/renderer/user_script_slave_unittest.cc
similarity index 73%
rename from chrome/renderer/greasemonkey_slave_unittest.cc
rename to chrome/renderer/user_script_slave_unittest.cc
index 4d1f5ad373d0a379fa515e423d3763acf42546fc..57d34a9f10c270e35a170e52b3b6dd399c7b6e4d 100644
--- a/chrome/renderer/greasemonkey_slave_unittest.cc
+++ b/chrome/renderer/user_script_slave_unittest.cc
@@ -3,20 +3,20 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "chrome/renderer/greasemonkey_slave.h"
+#include "chrome/renderer/user_script_slave.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(GreasemonkeySlaveTest, EscapeGlob) {
- EXPECT_EQ("", GreasemonkeyScript::EscapeGlob(""));
- EXPECT_EQ("*", GreasemonkeyScript::EscapeGlob("*"));
- EXPECT_EQ("www.google.com", GreasemonkeyScript::EscapeGlob("www.google.com"));
- EXPECT_EQ("*google.com*", GreasemonkeyScript::EscapeGlob("*google.com*"));
+TEST(UserScriptSlaveTest, EscapeGlob) {
+ EXPECT_EQ("", UserScript::EscapeGlob(""));
+ EXPECT_EQ("*", UserScript::EscapeGlob("*"));
+ EXPECT_EQ("www.google.com", UserScript::EscapeGlob("www.google.com"));
+ EXPECT_EQ("*google.com*", UserScript::EscapeGlob("*google.com*"));
EXPECT_EQ("foo\\\\bar\\?hot=dog",
- GreasemonkeyScript::EscapeGlob("foo\\bar?hot=dog"));
+ UserScript::EscapeGlob("foo\\bar?hot=dog"));
}
-TEST(GreasemonkeySlaveTest, Parse1) {
+TEST(UserScriptSlaveTest, Parse1) {
const std::string text(
"// This is my awesome script\n"
"// It does stuff.\n"
@@ -34,7 +34,7 @@ TEST(GreasemonkeySlaveTest, Parse1) {
"\n"
"alert('hoo!');\n");
- GreasemonkeyScript script("foo");
+ UserScript script("foo");
script.Parse(text);
EXPECT_EQ(3U, script.include_patterns_.size());
EXPECT_EQ(text, script.GetBody());
@@ -45,10 +45,10 @@ TEST(GreasemonkeySlaveTest, Parse1) {
EXPECT_FALSE(script.MatchesUrl(GURL("http://www.hotmail.com")));
}
-TEST(GreasemonkeySlaveTest, Parse2) {
+TEST(UserScriptSlaveTest, Parse2) {
const std::string text("default to @include *");
- GreasemonkeyScript script("foo");
+ UserScript script("foo");
script.Parse(text);
EXPECT_EQ(1U, script.include_patterns_.size());
EXPECT_EQ(text, script.GetBody());
@@ -56,13 +56,13 @@ TEST(GreasemonkeySlaveTest, Parse2) {
EXPECT_TRUE(script.MatchesUrl(GURL("bar")));
}
-TEST(GreasemonkeySlaveTest, Parse3) {
+TEST(UserScriptSlaveTest, Parse3) {
const std::string text(
"// ==UserScript==\n"
"// @include *foo*\n"
"// ==/UserScript=="); // no trailing newline
- GreasemonkeyScript script("foo");
+ UserScript script("foo");
script.Parse(text);
EXPECT_EQ(1U, script.include_patterns_.size());
EXPECT_EQ(text, script.GetBody());
« no previous file with comments | « chrome/renderer/greasemonkey_slave.cc ('k') | chrome/renderer/render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698