Index: chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc |
diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc b/chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc |
index bc380321c39edd6c02c6d81fc8ec94f8aa3fa9c6..0f1238e972aaab9e2fb7d365211d40fc0ae52251 100644 |
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc |
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc |
@@ -152,4 +152,30 @@ TEST(UrlBarTextureTest, WillFailOnUnhandledCodePoint) { |
EXPECT_EQ(UiUnsupportedMode::kCount, texture.unsupported_mode()); |
} |
+TEST(UrlBarTexture, ElisionIsAnUnsupportedMode) { |
+ TestUrlBarTexture texture; |
+ texture.DrawURL(GURL( |
+ "https://" |
+ "thereisnopossiblewaythatthishostnamecouldbecontainedinthelimitedspacetha" |
+ "tweareaffordedtousitsreallynotsomethingweshouldconsiderorplanfororpinour" |
+ "hopesonlestwegetdisappointedor.sad.com")); |
+ EXPECT_EQ(UiUnsupportedMode::kCouldNotElideURL, texture.unsupported_mode()); |
+} |
+ |
+TEST(UrlBarTexture, ShortURLAreIndeedSupported) { |
+ TestUrlBarTexture texture; |
+ texture.DrawURL(GURL("https://short.com/")); |
+ EXPECT_EQ(UiUnsupportedMode::kCount, texture.unsupported_mode()); |
+} |
+ |
+TEST(UrlBarTexture, LongPathsDoNotRequireElisionAndAreSupported) { |
+ TestUrlBarTexture texture; |
+ texture.DrawURL(GURL( |
+ "https://something.com/" |
+ "thereisnopossiblewaythatthishostnamecouldbecontainedinthelimitedspacetha" |
+ "tweareaffordedtousitsreallynotsomethingweshouldconsiderorplanfororpinour" |
+ "hopesonlestwegetdisappointedorsad.com")); |
+ EXPECT_EQ(UiUnsupportedMode::kCount, texture.unsupported_mode()); |
+} |
+ |
} // namespace vr_shell |