chromium/chrome/browser/enterprise/reporting/extension_request/extension_request_notification_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/enterprise/reporting/extension_request/extension_request_notification.h"

#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/notifications/notification_display_service_tester.h"
#include "chrome/browser/notifications/notification_handler.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

HasSubstr;

namespace enterprise_reporting {

constexpr char kChromeWebstoreUrl[] =;
constexpr char kFakeExtensionId[] =;

// The elements order of array below must match the order in enum
// ExtensionRequestNotification::NotifyType.
const char* const kNotificationIds[] =;
const char* const kNotificationTitleKeywords[] =;
const char* const kNotificationBodyKeywords[] =;

void OnNotificationClosed(bool expected_by_user, bool by_user) {}

class ExtensionRequestNotificationTest
    : public BrowserWithTestWindowTest,
      public testing::WithParamInterface<
          ExtensionRequestNotification::NotifyType> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(ExtensionRequestNotificationTest, HasExtensionAndClickedByUser) {}

TEST_P(ExtensionRequestNotificationTest, HasExtensionAndClosedByBrowser) {}

}  // namespace enterprise_reporting