Chromium Code Reviews| Index: chrome/browser/extensions/user_script_master_unittest.cc |
| diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc |
| index 8347cbe5e48c14d8eea63ccb98d228144bb5c816..bb9421a587b1a7179238f46a0aca68a5928f3d30 100644 |
| --- a/chrome/browser/extensions/user_script_master_unittest.cc |
| +++ b/chrome/browser/extensions/user_script_master_unittest.cc |
| @@ -229,6 +229,20 @@ TEST_F(UserScriptMasterTest, Parse8) { |
| script.exclude_url_patterns().begin()->GetAsString()); |
| } |
| +TEST_F(UserScriptMasterTest, Parse9) { |
| + const std::string text( |
| + "// ==UserScript==\n" |
| + "// @include about:blank\n" |
|
not at google - send to devlin
2014/04/21 19:56:22
ah. do we really need to make this work for about:
robwu
2014/04/21 22:15:41
No, my use case does not require about:blank for u
|
| + "// @match http://example.com/*\n" |
| + "// ==/UserScript==\n"); |
| + |
| + UserScript script; |
| + EXPECT_TRUE( |
| + UserScriptMaster::ScriptReloader::ParseMetadataHeader(text, &script)); |
| + ASSERT_EQ(0U, script.globs().size()); |
| + EXPECT_TRUE(script.match_about_blank()); |
| +} |
| + |
| TEST_F(UserScriptMasterTest, SkipBOMAtTheBeginning) { |
| base::FilePath path = temp_dir_.path().AppendASCII("script.user.js"); |
| const std::string content("\xEF\xBB\xBF alert('hello');"); |