// 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. #include "chrome/browser/vr/elements/scaled_depth_adjuster.h" #include <memory> #include "chrome/browser/vr/test/animation_utils.h" #include "chrome/browser/vr/test/constants.h" #include "chrome/browser/vr/ui_scene.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/test/geometry_util.h" namespace vr { void CheckScaleAndDepth(UiElement* element, float s) { … } // This test confirms that an element is both positioned the right distance from // the origin and that the inherited scale is correct (should match the distance // in magnitude). TEST(ScaledDepthAdjuster, SimpleDepth) { … } // This test confirms that depth and scale adjustments work correctly if nested. // Constructs a scene that appears as follows: // kRoot // grandparent scaler (2.5) // grandparent // parent scaler(-.1) // parent // child scaler(.2) // child TEST(ScaledDepthAdjuster, InheritedDepth) { … } } // namespace vr