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

Side by Side Diff: third_party/WebKit/Source/platform/json/JSONValuesTest.cpp

Issue 2803603002: Rewrite references to "wtf/" to "platform/wtf/" in platform/json. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/json/JSONValues.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/json/JSONValues.h" 5 #include "platform/json/JSONValues.h"
6 6
7 #include "platform/wtf/text/StringBuilder.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include "wtf/text/StringBuilder.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 namespace { 12 namespace {
13 13
14 class JSONValueDeletionVerifier : public JSONValue { 14 class JSONValueDeletionVerifier : public JSONValue {
15 public: 15 public:
16 JSONValueDeletionVerifier(int& counter) : m_counter(counter) {} 16 JSONValueDeletionVerifier(int& counter) : m_counter(counter) {}
17 17
18 ~JSONValueDeletionVerifier() override { ++m_counter; } 18 ~JSONValueDeletionVerifier() override { ++m_counter; }
(...skipping 14 matching lines...) Expand all
33 33
34 TEST(JSONValuesTest, ObjectCastDoesNotLeak) { 34 TEST(JSONValuesTest, ObjectCastDoesNotLeak) {
35 int deletionCount = 0; 35 int deletionCount = 0;
36 std::unique_ptr<JSONValueDeletionVerifier> notAnObject( 36 std::unique_ptr<JSONValueDeletionVerifier> notAnObject(
37 new JSONValueDeletionVerifier(deletionCount)); 37 new JSONValueDeletionVerifier(deletionCount));
38 EXPECT_EQ(nullptr, JSONArray::from(std::move(notAnObject))); 38 EXPECT_EQ(nullptr, JSONArray::from(std::move(notAnObject)));
39 EXPECT_EQ(1, deletionCount); 39 EXPECT_EQ(1, deletionCount);
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/json/JSONValues.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698