Commit 9e1e5d01 authored by Chris Mumford's avatar Chris Mumford Committed by Commit Bot

[blob] Remove use of base::Closure in test.

Switched to base::RepeatingClosure as well as switching base::BindOnce
to WTF::Bind as base::Bind* is banned in Blink.

Bug: 1007835
Change-Id: I6b6b6d028671ea2e50dd60e8cfc8048803aafd2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949114Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Chris Mumford <cmumford@google.com>
Cr-Commit-Position: refs/heads/master@{#721216}
parent 71b1a053
...@@ -166,13 +166,13 @@ class BlobDataHandleTest : public testing::Test { ...@@ -166,13 +166,13 @@ class BlobDataHandleTest : public testing::Test {
Vector<uint8_t> received_bytes; Vector<uint8_t> received_bytes;
mojo::Remote<mojom::blink::BytesProvider> actual_data( mojo::Remote<mojom::blink::BytesProvider> actual_data(
std::move(actual->get_bytes()->data)); std::move(actual->get_bytes()->data));
actual_data->RequestAsReply(base::BindOnce( actual_data->RequestAsReply(WTF::Bind(
[](base::Closure quit_closure, Vector<uint8_t>* bytes_out, [](base::RepeatingClosure quit_closure, Vector<uint8_t>* bytes_out,
const Vector<uint8_t>& bytes) { const Vector<uint8_t>& bytes) {
*bytes_out = bytes; *bytes_out = bytes;
quit_closure.Run(); quit_closure.Run();
}, },
loop.QuitClosure(), &received_bytes)); loop.QuitClosure(), WTF::Unretained(&received_bytes)));
loop.Run(); loop.Run();
if (expected->get_bytes()->embedded_data) if (expected->get_bytes()->embedded_data)
EXPECT_EQ(expected->get_bytes()->embedded_data, received_bytes); EXPECT_EQ(expected->get_bytes()->embedded_data, received_bytes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment