| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/test/chromedriver/fake_session_accessor.h" | |
| 6 #include "testing/gtest/include/gtest/gtest.h" | |
| 7 | |
| 8 FakeSessionAccessor::FakeSessionAccessor(Session* session) | |
| 9 : session_(session), | |
| 10 is_accessed_(false), | |
| 11 is_session_deleted_(false) {} | |
| 12 | |
| 13 Session* FakeSessionAccessor::Access( | |
| 14 scoped_ptr<base::AutoLock>* lock) { | |
| 15 is_accessed_ = true; | |
| 16 return session_; | |
| 17 } | |
| 18 | |
| 19 bool FakeSessionAccessor::IsSessionDeleted() const { | |
| 20 return is_session_deleted_; | |
| 21 } | |
| 22 | |
| 23 void FakeSessionAccessor::DeleteSession() { | |
| 24 ASSERT_TRUE(is_accessed_); | |
| 25 is_session_deleted_ = true; | |
| 26 } | |
| 27 | |
| 28 FakeSessionAccessor::~FakeSessionAccessor() {} | |
| OLD | NEW |