chromium/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_sets_test.cc

// Copyright 2017 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/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_sets.h"

#include <cmath>

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/modules/mediastream/web_media_stream_track.h"
#include "third_party/blink/renderer/modules/mediastream/mock_constraint_factory.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {
namespace media_constraints {

ResolutionSet;
Point;
BoolSet;

namespace {

const int kDefaultWidth =;
const int kDefaultHeight =;
constexpr double kDefaultAspectRatio =;

// Defined as macro in order to get more informative line-number information
// when a test fails.
#define EXPECT_POINT_EQ(p1, p2)

// Checks if |point| is an element of |vertices| using
// Point::IsApproximatelyEqualTo() to test for equality.
void VerticesContain(const Vector<Point>& vertices, const Point& point) {}

bool AreCounterclockwise(const Vector<Point>& vertices) {}

// Determines if |vertices| is valid according to the contract for
// ResolutionCandidateSet::ComputeVertices().
bool AreValidVertices(const ResolutionSet& set, const Vector<Point>& vertices) {}

// This function provides an alternative method for computing the projection
// of |point| on the line of segment |s1||s2| to be used to compare the results
// provided by Point::ClosestPointInSegment(). Since it relies on library
// functions, it has larger error in practice than
// Point::ClosestPointInSegment(), so results must be compared with
// Point::IsApproximatelyEqualTo().
// This function only computes projections. The result may be outside the
// segment |s1||s2|.
Point ProjectionOnSegmentLine(const Point& point,
                              const Point& s1,
                              const Point& s2) {}

}  // namespace

class MediaStreamConstraintsUtilSetsTest : public testing::Test {};

// This test tests the test-harness function AreValidVertices.
TEST_F(MediaStreamConstraintsUtilSetsTest, VertexListValidity) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, PointOperations) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionUnconstrained) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionConstrained) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionTrivialEmptiness) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionLineConstraintsEmptiness) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionBoxEmptiness) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionPointIntersection) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionLineIntersection) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionBoxIntersection) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionPointSetClosestPoint) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionLineSetClosestPoint) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionGeneralSetClosestPoint) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionIdealIntersects) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionIdealOutsideSinglePoint) {}

TEST_F(MediaStreamConstraintsUtilSetsTest,
       ResolutionIdealOutsideMultiplePoints) {}

TEST_F(MediaStreamConstraintsUtilSetsTest,
       ResolutionUnconstrainedExtremeIdeal) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ResolutionVertices) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ExactResolution) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, ZeroExactResolution) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, NumericRangeSetDouble) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, NumericRangeSetFromConstraint) {}

TEST_F(MediaStreamConstraintsUtilSetsTest,
       NumericRangeSetFromConstraintWithBounds) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, NumericRangeSetFromValue) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, DiscreteSetString) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, DiscreteSetBool) {}

TEST_F(MediaStreamConstraintsUtilSetsTest, RescaleSetFromConstraints) {}

}  // namespace media_constraints
}  // namespace blink