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

Unified Diff: third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp

Issue 2771783003: Move wtf_unittests to platform/wtf/. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp b/third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp
deleted file mode 100644
index 9191eafb60a44f9cd6f3213d8279a2079bcf4046..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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 "wtf/text/TextEncoding.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace WTF {
-
-namespace {
-
-TEST(TextEncoding, NonByteBased) {
- EXPECT_FALSE(TextEncoding("utf-8").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-16").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-16le").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-16be").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-32").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-32le").isNonByteBasedEncoding());
- EXPECT_TRUE(TextEncoding("utf-32be").isNonByteBasedEncoding());
- EXPECT_FALSE(TextEncoding("windows-1252").isNonByteBasedEncoding());
- EXPECT_FALSE(TextEncoding("gbk").isNonByteBasedEncoding());
- EXPECT_FALSE(TextEncoding("utf-7").isNonByteBasedEncoding());
-}
-
-TEST(TextEncoding, ClosestByteBased) {
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-8").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16le").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16be").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32le").closestByteBasedEquivalent().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32be").closestByteBasedEquivalent().name());
- EXPECT_STREQ(
- "windows-1252",
- TextEncoding("windows-1252").closestByteBasedEquivalent().name());
- EXPECT_STREQ("GBK", TextEncoding("gbk").closestByteBasedEquivalent().name());
- EXPECT_EQ(nullptr, TextEncoding("utf-7").closestByteBasedEquivalent().name());
-}
-
-TEST(TextEncoding, EncodingForFormSubmission) {
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-8").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16le").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-16be").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32le").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-32be").encodingForFormSubmission().name());
- EXPECT_STREQ("windows-1252",
- TextEncoding("windows-1252").encodingForFormSubmission().name());
- EXPECT_STREQ("GBK", TextEncoding("gbk").encodingForFormSubmission().name());
- EXPECT_STREQ("UTF-8",
- TextEncoding("utf-7").encodingForFormSubmission().name());
-}
-}
-}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.cpp ('k') | third_party/WebKit/Source/wtf/text/WTFStringTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698