| Index: content/common/manifest_util_unittest.cc
|
| diff --git a/content/common/manifest_util_unittest.cc b/content/common/manifest_util_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7a24b69c4fba2328df66dc9689ed06961ff47ddb
|
| --- /dev/null
|
| +++ b/content/common/manifest_util_unittest.cc
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/public/common/manifest_util.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#include "url/gurl.h"
|
| +
|
| +namespace content {
|
| +
|
| +TEST(ManifestUtilTest, WebDisplayModeToString) {
|
| + for (int display = 0; display < blink::WebDisplayModeLast; ++display) {
|
| + std::string display_string =
|
| + WebDisplayModeToString(static_cast<blink::WebDisplayMode>(display));
|
| + blink::WebDisplayMode converted_display_enum =
|
| + WebDisplayModeFromString(display_string);
|
| + EXPECT_EQ(converted_display_enum, display)
|
| + << "Incorrect conversion from display enum value to string: " << display
|
| + << " " << display_string;
|
| + }
|
| +}
|
| +
|
| +TEST(ManifestUtilTest, WebScreenOrientationLockTypeToString) {
|
| + for (int orientation = 0;
|
| + orientation < blink::WebScreenOrientationLockNatural; ++orientation) {
|
| + std::string orientation_string = WebScreenOrientationLockTypeToString(
|
| + static_cast<blink::WebScreenOrientationLockType>(orientation));
|
| + blink::WebScreenOrientationLockType converted_orientation_enum =
|
| + WebScreenOrientationLockTypeFromString(orientation_string);
|
| + EXPECT_EQ(converted_orientation_enum, orientation)
|
| + << "Incorrect conversion from orientation enum value to string: "
|
| + << orientation << " " << orientation_string;
|
| + }
|
| +}
|
| +
|
| +// manifest_parser_unittest.cc has additional tests.
|
| +
|
| +} // namespace content
|
|
|