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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceResponseTest.cpp

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 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
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/loader/fetch/ResourceResponse.h" 5 #include "platform/loader/fetch/ResourceResponse.h"
6 6
7 #include "platform/CrossThreadFunctional.h" 7 #include "platform/CrossThreadFunctional.h"
8 #include "platform/WebTaskRunner.h" 8 #include "platform/WebTaskRunner.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 EXPECT_EQ(src.signature_data_, dest.signature_data_); 66 EXPECT_EQ(src.signature_data_, dest.signature_data_);
67 EXPECT_NE(src.signature_data_.Impl(), dest.signature_data_.Impl()); 67 EXPECT_NE(src.signature_data_.Impl(), dest.signature_data_.Impl());
68 } 68 }
69 69
70 TEST(ResourceResponseTest, CrossThreadAtomicStrings) { 70 TEST(ResourceResponseTest, CrossThreadAtomicStrings) {
71 // This test checks that AtomicStrings in ResourceResponse doesn't cause the 71 // This test checks that AtomicStrings in ResourceResponse doesn't cause the
72 // failure of ThreadRestrictionVerifier check. 72 // failure of ThreadRestrictionVerifier check.
73 ResourceResponse response(CreateTestResponse()); 73 ResourceResponse response(CreateTestResponse());
74 RunHeaderRelatedTest(response); 74 RunHeaderRelatedTest(response);
75 std::unique_ptr<WebThread> thread = 75 std::unique_ptr<WebThread> thread =
76 WTF::WrapUnique(Platform::Current()->CreateThread("WorkerThread")); 76 Platform::Current()->CreateThread("WorkerThread");
77 thread->GetWebTaskRunner()->PostTask(BLINK_FROM_HERE, 77 thread->GetWebTaskRunner()->PostTask(BLINK_FROM_HERE,
78 CrossThreadBind(&RunInThread)); 78 CrossThreadBind(&RunInThread));
79 thread.reset(); 79 thread.reset();
80 } 80 }
81 81
82 } // namespace blink 82 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698