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

Unified Diff: third_party/WebKit/Source/platform/fonts/ScriptRunIteratorTest.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 11 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/platform/fonts/ScriptRunIteratorTest.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/ScriptRunIteratorTest.cpp b/third_party/WebKit/Source/platform/fonts/ScriptRunIteratorTest.cpp
index d7e6d17ba9bb4708c7864a7cb79d7c51ced07325..dacb0392cc992363f74ca3066c85f2fae83d6e58 100644
--- a/third_party/WebKit/Source/platform/fonts/ScriptRunIteratorTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/ScriptRunIteratorTest.cpp
@@ -109,7 +109,7 @@ class MockScriptData : public ScriptData {
}
static String ToTestString(const std::string& input) {
- String result(emptyString16Bit());
+ String result(emptyString16Bit);
bool inSet = false;
int seen = 0;
int code = 0;
@@ -288,7 +288,7 @@ const int MockScriptData::kTable[] = {
class ScriptRunIteratorTest : public testing::Test {
protected:
void CheckRuns(const Vector<TestRun>& runs) {
- String text(emptyString16Bit());
+ String text(emptyString16Bit);
Vector<ExpectedRun> expect;
for (auto& run : runs) {
text.append(String::fromUTF8(run.text.c_str()));
@@ -301,7 +301,7 @@ class ScriptRunIteratorTest : public testing::Test {
// FIXME crbug.com/527329 - CheckMockRuns should be replaced by finding
// suitable equivalent real codepoint sequences instead.
void CheckMockRuns(const Vector<TestRun>& runs) {
- String text(emptyString16Bit());
+ String text(emptyString16Bit);
Vector<ExpectedRun> expect;
for (const TestRun& run : runs) {
text.append(MockScriptData::ToTestString(run.text));
@@ -329,7 +329,7 @@ class ScriptRunIteratorTest : public testing::Test {
};
TEST_F(ScriptRunIteratorTest, Empty) {
- String empty(emptyString16Bit());
+ String empty(emptyString16Bit);
ScriptRunIterator scriptRunIterator(empty.characters16(), empty.length());
unsigned limit = 0;
UScriptCode code = USCRIPT_INVALID_CODE;

Powered by Google App Engine
This is Rietveld 408576698