blob: 3e9f57fe43644fff8a4ccfe8b2b07cc6e40a288d [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/chrome/browser/overlays/public/overlay_response.h"
#include "ios/chrome/browser/overlays/test/fake_overlay_user_data.h"
#include "testing/platform_test.h"
using OverlayResponseTest = PlatformTest;
// Tests that OverlayResponses can be constructed.
TEST_F(OverlayResponseTest, CreateWithInfo) {
int value = 0;
std::unique_ptr<OverlayResponse> request =
OverlayResponse::CreateWithInfo<FakeOverlayUserData>(&value);
FakeOverlayUserData* info = request->GetInfo<FakeOverlayUserData>();
ASSERT_TRUE(info);
EXPECT_EQ(info->value(), &value);
}