| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/testing/DummyPageHolder.h" | 32 #include "core/testing/DummyPageHolder.h" |
| 33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class MockActiveDOMObject final : public GarbageCollectedFinalized<MockActiveDOM
Object>, public ActiveDOMObject { | 38 class MockActiveDOMObject final : public GarbageCollectedFinalized<MockActiveDOM
Object>, public ActiveDOMObject { |
| 39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockActiveDOMObject); | 39 USING_GARBAGE_COLLECTED_MIXIN(MockActiveDOMObject); |
| 40 public: | 40 public: |
| 41 explicit MockActiveDOMObject(ExecutionContext* context) : ActiveDOMObject(co
ntext) { } | 41 explicit MockActiveDOMObject(ExecutionContext* context) : ActiveDOMObject(co
ntext) { } |
| 42 | 42 |
| 43 DEFINE_INLINE_VIRTUAL_TRACE() | 43 DEFINE_INLINE_VIRTUAL_TRACE() |
| 44 { | 44 { |
| 45 ActiveDOMObject::trace(visitor); | 45 ActiveDOMObject::trace(visitor); |
| 46 } | 46 } |
| 47 | 47 |
| 48 MOCK_METHOD0(suspend, void()); | 48 MOCK_METHOD0(suspend, void()); |
| 49 MOCK_METHOD0(resume, void()); | 49 MOCK_METHOD0(resume, void()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 TEST_F(ActiveDOMObjectTest, MoveToStoppedDocument) | 101 TEST_F(ActiveDOMObjectTest, MoveToStoppedDocument) |
| 102 { | 102 { |
| 103 destDocument().detach(); | 103 destDocument().detach(); |
| 104 | 104 |
| 105 EXPECT_CALL(activeDOMObject(), stop()); | 105 EXPECT_CALL(activeDOMObject(), stop()); |
| 106 activeDOMObject().didMoveToNewExecutionContext(&destDocument()); | 106 activeDOMObject().didMoveToNewExecutionContext(&destDocument()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |