| 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 01709d451131a62997ee065d9278c5c9e96312b9..452a5920256c97c84b9d29ba5ad56ac1ed6ba8a1 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
|
| @@ -9,7 +9,9 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/android/vr_shell/textures/render_text_wrapper.h"
|
| +#include "chrome/browser/android/vr_shell/toolbar_state.h"
|
| #include "components/security_state/core/security_state.h"
|
| +#include "components/toolbar/vector_icons.h"
|
| #include "components/url_formatter/url_formatter.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -44,7 +46,11 @@ class TestUrlBarTexture : public UrlBarTexture {
|
|
|
| void DrawURL(const GURL& gurl) {
|
| unsupported_mode_ = UiUnsupportedMode::kCount;
|
| - SetURL(gurl);
|
| + ToolbarState state(gurl, SecurityLevel::HTTP_SHOW_WARNING,
|
| + &toolbar::kHttpsInvalidIcon,
|
| + base::UTF8ToUTF16("Not secure"), true);
|
| + ASSERT_TRUE(state.should_display_url);
|
| + SetToolbarState(state);
|
| sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(
|
| texture_size_.width(), texture_size_.height());
|
| DrawAndLayout(surface->getCanvas(), texture_size_);
|
| @@ -280,4 +286,10 @@ TEST(UrlBarTexture, LongPathsDoNotRequireElisionAndAreSupported) {
|
| EXPECT_EQ(UiUnsupportedMode::kCount, texture.unsupported_mode());
|
| }
|
|
|
| +TEST(UrlBarTexture, EmptyURL) {
|
| + TestUrlBarTexture texture;
|
| + texture.DrawURL(GURL());
|
| + EXPECT_EQ(UiUnsupportedMode::kCount, texture.unsupported_mode());
|
| +}
|
| +
|
| } // namespace vr_shell
|
|
|