#include "third_party/blink/renderer/core/css/style_environment_variables.h"
#include "third_party/blink/renderer/core/css/document_style_environment_variables.h"
#include "third_party/blink/renderer/core/css/properties/longhands.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
namespace blink {
namespace {
static const char kVariableName[] = …;
static const Color kTestColorRed = …;
static const char kVariableTestColor[] = …;
static const Color kAltTestColor = …;
static const char kVariableAltTestColor[] = …;
static const Color kNoColor = …;
static const char kSafeAreaInsetExpectedDefault[] = …;
}
class StyleEnvironmentVariablesTest : public PageTestBase { … };
TEST_F(StyleEnvironmentVariablesTest, DocumentVariable_AfterLoad) { … }
TEST_F(StyleEnvironmentVariablesTest, DocumentVariable_Change) { … }
TEST_F(StyleEnvironmentVariablesTest,
DocumentVariable_Override_RemoveDocument) { … }
TEST_F(StyleEnvironmentVariablesTest, DocumentVariable_Override_RemoveGlobal) { … }
TEST_F(StyleEnvironmentVariablesTest, DocumentVariable_Preset) { … }
TEST_F(StyleEnvironmentVariablesTest, DocumentVariable_Remove) { … }
TEST_F(StyleEnvironmentVariablesTest, MultiDocumentInvalidation_FromRoot) { … }
TEST_F(StyleEnvironmentVariablesTest, MultiDocumentInvalidation_FromDocument) { … }
TEST_F(StyleEnvironmentVariablesTest, NavigateToClear) { … }
TEST_F(StyleEnvironmentVariablesTest, GlobalVariable_AfterLoad) { … }
TEST_F(StyleEnvironmentVariablesTest, GlobalVariable_Change) { … }
TEST_F(StyleEnvironmentVariablesTest, GlobalVariable_DefaultsPresent) { … }
TEST_F(StyleEnvironmentVariablesTest, GlobalVariable_Preset) { … }
TEST_F(StyleEnvironmentVariablesTest, GlobalVariable_Remove) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_IgnoreMediaControls) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_InvalidProperty) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_NoVariable) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_SafeAreaInsetBottom) { … }
TEST_F(StyleEnvironmentVariablesTest,
RecordUseCounter_ViewportFitCoverOrSafeAreaInsetBottom) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_SafeAreaInsetLeft) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_SafeAreaInsetRight) { … }
TEST_F(StyleEnvironmentVariablesTest, RecordUseCounter_SafeAreaInsetTop) { … }
TEST_F(StyleEnvironmentVariablesTest, KeyboardInset_AfterLoad) { … }
TEST_F(StyleEnvironmentVariablesTest, TwoDimensionalVariables_BasicResolve) { … }
TEST_F(StyleEnvironmentVariablesTest, TwoDimensionalVariables_UpdateValue) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_UndefinedFallsBack) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_IncorrectDimensionsFallsBack) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_NormalVariableWithDimensionFallsBack) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_NegativeIndicesInvalid) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_NonCommaAfterIndexInvalid) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_NonIntegerIndicesInvalid) { … }
TEST_F(StyleEnvironmentVariablesTest,
TwoDimensionalVariables_NoIndicesFallsBack) { … }
TEST_F(StyleEnvironmentVariablesTest, TwoDimensionalVariables_Removal) { … }
#if !BUILDFLAG(IS_ANDROID)
TEST_F(StyleEnvironmentVariablesTest, TitlebarArea_AfterLoad) { … }
TEST_F(StyleEnvironmentVariablesTest, TitlebarArea_AfterNavigation) { … }
#endif
}