Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: content/common/manifest_util_unittest.cc

Issue 2138973002: Initial CL for talking to the WebAPK server to generate WebAPK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_builder_impl2 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698