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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.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/TextCodecUserDefinedTest.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.cpp
deleted file mode 100644
index 9442ab5a21092da40f44b700577fbf680e6e0c8e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.cpp
+++ /dev/null
@@ -1,46 +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/TextCodecUserDefined.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/TextCodec.h"
-#include "wtf/text/TextEncoding.h"
-#include "wtf/text/TextEncodingRegistry.h"
-#include <memory>
-
-TEST(TextCodecUserDefinedTest, QuestionMarksAndSurrogates) {
- WTF::TextEncoding encoding("x-user-defined");
- std::unique_ptr<WTF::TextCodec> codec(newTextCodec(encoding));
-
- {
- const LChar testCase[] = {0xd1, 0x16, 0x86};
- size_t testCaseSize = WTF_ARRAY_LENGTH(testCase);
- CString result = codec->encode(testCase, testCaseSize,
- WTF::QuestionMarksForUnencodables);
- EXPECT_STREQ("?\x16?", result.data());
- }
- {
- const UChar testCase[] = {0xd9f0, 0xdcd9};
- size_t testCaseSize = WTF_ARRAY_LENGTH(testCase);
- CString result = codec->encode(testCase, testCaseSize,
- WTF::QuestionMarksForUnencodables);
- EXPECT_STREQ("?", result.data());
- }
- {
- const UChar testCase[] = {0xd9f0, 0xdcd9, 0xd9f0, 0xdcd9};
- size_t testCaseSize = WTF_ARRAY_LENGTH(testCase);
- CString result = codec->encode(testCase, testCaseSize,
- WTF::QuestionMarksForUnencodables);
- EXPECT_STREQ("??", result.data());
- }
- {
- const UChar testCase[] = {0x0041, 0xd9f0, 0xdcd9, 0xf7c1, 0xd9f0, 0xdcd9};
- size_t testCaseSize = WTF_ARRAY_LENGTH(testCase);
- CString result = codec->encode(testCase, testCaseSize,
- WTF::QuestionMarksForUnencodables);
- EXPECT_STREQ("A?\xC1?", result.data());
- }
-}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp ('k') | third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698