OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include <gtest/gtest.h> | 38 #include <gtest/gtest.h> |
39 | 39 |
40 using namespace WebCore; | 40 using namespace WebCore; |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 class NullEventQueue FINAL : public EventQueue { | 44 class NullEventQueue FINAL : public EventQueue { |
45 public: | 45 public: |
46 NullEventQueue() { } | 46 NullEventQueue() { } |
47 virtual ~NullEventQueue() { } | 47 virtual ~NullEventQueue() { } |
48 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE { return true; } | 48 virtual bool enqueueEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE { return t
rue; } |
49 virtual bool cancelEvent(Event*) OVERRIDE { return true; } | 49 virtual bool cancelEvent(Event*) OVERRIDE { return true; } |
50 virtual void close() OVERRIDE { } | 50 virtual void close() OVERRIDE { } |
51 }; | 51 }; |
52 | 52 |
53 class NullExecutionContext FINAL : public ExecutionContext, public RefCounted<Nu
llExecutionContext> { | 53 class NullExecutionContext FINAL : public ExecutionContext, public RefCounted<Nu
llExecutionContext> { |
54 public: | 54 public: |
55 using RefCounted<NullExecutionContext>::ref; | 55 using RefCounted<NullExecutionContext>::ref; |
56 using RefCounted<NullExecutionContext>::deref; | 56 using RefCounted<NullExecutionContext>::deref; |
57 | 57 |
58 virtual void refExecutionContext() OVERRIDE { ref(); } | 58 virtual void refExecutionContext() OVERRIDE { ref(); } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 OwnPtr<MockWebIDBDatabase> backend = MockWebIDBDatabase::create(); | 167 OwnPtr<MockWebIDBDatabase> backend = MockWebIDBDatabase::create(); |
168 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(executionCon
text(), callbacks, transactionId, version); | 168 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(executionCon
text(), callbacks, transactionId, version); |
169 EXPECT_EQ(request->readyState(), "pending"); | 169 EXPECT_EQ(request->readyState(), "pending"); |
170 | 170 |
171 executionContext()->stopActiveDOMObjects(); | 171 executionContext()->stopActiveDOMObjects(); |
172 request->onSuccess(backend.release(), metadata); | 172 request->onSuccess(backend.release(), metadata); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 } // namespace | 176 } // namespace |
OLD | NEW |