OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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/manifest_util.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "url/gurl.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 TEST(ManifestUtilTest, WebDisplayModeToString) { |
| 12 for (int display = 0; display < blink::WebDisplayModeLast; ++display) { |
| 13 std::string display_string = |
| 14 WebDisplayModeToString(static_cast<blink::WebDisplayMode>(display)); |
| 15 blink::WebDisplayMode converted_display_enum = |
| 16 WebDisplayModeFromString(display_string); |
| 17 EXPECT_EQ(converted_display_enum, display) |
| 18 << "Incorrect conversion from display enum value to string: " << display |
| 19 << " " << display_string; |
| 20 } |
| 21 } |
| 22 |
| 23 TEST(ManifestUtilTest, WebScreenOrientationLockTypeToString) { |
| 24 for (int orientation = 0; |
| 25 orientation < blink::WebScreenOrientationLockNatural; ++orientation) { |
| 26 std::string orientation_string = WebScreenOrientationLockTypeToString( |
| 27 static_cast<blink::WebScreenOrientationLockType>(orientation)); |
| 28 blink::WebScreenOrientationLockType converted_orientation_enum = |
| 29 WebScreenOrientationLockTypeFromString(orientation_string); |
| 30 EXPECT_EQ(converted_orientation_enum, orientation) |
| 31 << "Incorrect conversion from orientation enum value to string: " |
| 32 << orientation << " " << orientation_string; |
| 33 } |
| 34 } |
| 35 |
| 36 // manifest_parser_unittest.cc has additional tests. |
| 37 |
| 38 } // namespace content |
OLD | NEW |