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

Side by Side Diff: ios/web/public/test/fakes/test_web_state.mm

Issue 2971093002: [ios] Take snapshot for tab grid. (Closed)
Patch Set: Update unit test. Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web/public/test/fakes/test_web_state.h" 5 #import "ios/web/public/test/fakes/test_web_state.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() { 228 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() {
229 return nullptr; 229 return nullptr;
230 } 230 }
231 231
232 bool TestWebState::HasOpener() const { 232 bool TestWebState::HasOpener() const {
233 return false; 233 return false;
234 } 234 }
235 235
236 void TestWebState::TakeSnapshot(const SnapshotCallback& callback, 236 void TestWebState::TakeSnapshot(const SnapshotCallback& callback,
237 CGSize target_size) const { 237 CGSize target_size) const {
238 base::SequencedTaskRunnerHandle::Get()->PostTask( 238 callback.Run(gfx::Image([[UIImage alloc] init]));
239 FROM_HERE, base::Bind(callback, gfx::Image()));
240 } 239 }
241 240
242 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { 241 base::WeakPtr<WebState> TestWebState::AsWeakPtr() {
243 NOTREACHED(); 242 NOTREACHED();
244 return base::WeakPtr<WebState>(); 243 return base::WeakPtr<WebState>();
245 } 244 }
246 245
247 } // namespace web 246 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698