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

Unified Diff: extensions/browser/file_highlighter_unittest.cc

Issue 2245143004: Make sure there is no crash on parsing empty manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup! Make sure there is no crash on parsing empty manifest Created 4 years, 4 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
Index: extensions/browser/file_highlighter_unittest.cc
diff --git a/extensions/browser/file_highlighter_unittest.cc b/extensions/browser/file_highlighter_unittest.cc
index f419109577e0deffae99e862085101a15264a49a..e11d82849227f161b8b1a7df0b54e9ad290c0fe2 100644
--- a/extensions/browser/file_highlighter_unittest.cc
+++ b/extensions/browser/file_highlighter_unittest.cc
@@ -93,6 +93,11 @@ TEST(ManifestHighlighterUnitTest, ManifestHighlighterUnitTest) {
ManifestHighlighter international_feature(
kManifest, "international_key", std::string());
EXPECT_EQ(kInternationalFeature, international_feature.GetFeature());
+
+ // Empty manifest. Check that there is no crash.
+ const char kEmptyManifest[] = "";
+ ManifestHighlighter no_feature(kEmptyManifest, std::string(), std::string());
+ EXPECT_EQ(std::string(), no_feature.GetFeature());
}
TEST(SouceHighlighterUnitTest, SourceHighlighterUnitTest) {
« extensions/browser/file_highlighter.cc ('K') | « extensions/browser/file_highlighter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698