| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 24 matching lines...) Expand all Loading... |
| 35 #include <gtest/gtest.h> | 35 #include <gtest/gtest.h> |
| 36 | 36 |
| 37 using namespace WebCore; | 37 using namespace WebCore; |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 class NullEventQueue : public EventQueue { | 41 class NullEventQueue : public EventQueue { |
| 42 public: | 42 public: |
| 43 NullEventQueue() { } | 43 NullEventQueue() { } |
| 44 virtual ~NullEventQueue() { } | 44 virtual ~NullEventQueue() { } |
| 45 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE { return true; } | 45 virtual bool enqueueEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE { return t
rue; } |
| 46 virtual bool cancelEvent(Event*) OVERRIDE { return true; } | 46 virtual bool cancelEvent(Event*) OVERRIDE { return true; } |
| 47 virtual void close() OVERRIDE { } | 47 virtual void close() OVERRIDE { } |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 class NullExecutionContext : public ExecutionContext, public RefCounted<NullExec
utionContext> { | 50 class NullExecutionContext : public ExecutionContext, public RefCounted<NullExec
utionContext> { |
| 51 public: | 51 public: |
| 52 using RefCounted<NullExecutionContext>::ref; | 52 using RefCounted<NullExecutionContext>::ref; |
| 53 using RefCounted<NullExecutionContext>::deref; | 53 using RefCounted<NullExecutionContext>::deref; |
| 54 | 54 |
| 55 virtual void refExecutionContext() OVERRIDE { ref(); } | 55 virtual void refExecutionContext() OVERRIDE { ref(); } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 bool isMarked = false; | 130 bool isMarked = false; |
| 131 | 131 |
| 132 context->setTasksNeedSuspention(true); | 132 context->setTasksNeedSuspention(true); |
| 133 runner->postTask(MarkingBooleanTask::create(&isMarked)); | 133 runner->postTask(MarkingBooleanTask::create(&isMarked)); |
| 134 runner.clear(); | 134 runner.clear(); |
| 135 WebCore::testing::runPendingTasks(); | 135 WebCore::testing::runPendingTasks(); |
| 136 EXPECT_FALSE(isMarked); | 136 EXPECT_FALSE(isMarked); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } | 139 } |
| OLD | NEW |