chromium/chrome/browser/ui/views/qrcode_generator/qrcode_generator_bubble_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/qrcode_generator/qrcode_generator_bubble.h"

#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/qr_code_generator/bitmap_generator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/view_observer.h"
#include "url/gurl.h"

namespace qrcode_generator {

namespace {

QRCodeGeneratorBubbleTest;

TEST_F(QRCodeGeneratorBubbleTest, SuggestedDownloadURLNoIP) {}

class VisibilityChangedWaiter : public views::ViewObserver {};

class QRCodeGeneratorBubbleUITest : public ChromeViewsTestBase {};

// This test is a bit fiddly because mojo imposes asynchronicity on both sender
// and receiver sides of a service. That means that:
// 1. We need to wait for QR code generation requests to arrive at the service
// 2. We need to wait for observable changes to the ImageView to know when
//    responses have been delivered
TEST_F(QRCodeGeneratorBubbleUITest, ImageShowsAfterErrorState) {}

TEST_F(QRCodeGeneratorBubbleUITest,
       PlaceholderImageShowsAfterTextFieldEmptied) {}

TEST_F(QRCodeGeneratorBubbleUITest, LabelHidesAfterErrorState) {}

}  // namespace

}  // namespace qrcode_generator