1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "content/public/common/page_zoom.h" 6 7 #include "testing/gtest/include/gtest/gtest.h" 8 9 TEST(PageZoomTest, ZoomValuesEqual) { 10 // Test two identical values. 11 EXPECT_TRUE(content::ZoomValuesEqual(1.5, 1.5)); 12 13 // Test two values that are close enough to be considered equal. 14 EXPECT_TRUE(content::ZoomValuesEqual(1.5, 1.49999999)); 15 16 // Test two values that are close, but should not be considered equal. 17 EXPECT_FALSE(content::ZoomValuesEqual(1.5, 1.4)); 18 } 19 20