| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 void DocumentTest::SetUp() | 65 void DocumentTest::SetUp() |
| 66 { | 66 { |
| 67 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); | 67 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void DocumentTest::setHtmlInnerHTML(const char* htmlContent) | 70 void DocumentTest::setHtmlInnerHTML(const char* htmlContent) |
| 71 { | 71 { |
| 72 document().documentElement()->setInnerHTML(String::fromUTF8(htmlContent), AS
SERT_NO_EXCEPTION); | 72 document().documentElement()->setInnerHTML(String::fromUTF8(htmlContent), AS
SERT_NO_EXCEPTION); |
| 73 document().view()->updateAllLifecyclePhases(); | 73 document().view()->updateLayoutAndStyleForPainting(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 class MockDocumentVisibilityObserver | 76 class MockDocumentVisibilityObserver |
| 77 : public NoBaseWillBeGarbageCollectedFinalized<MockDocumentVisibilityObserve
r> | 77 : public NoBaseWillBeGarbageCollectedFinalized<MockDocumentVisibilityObserve
r> |
| 78 , public DocumentVisibilityObserver { | 78 , public DocumentVisibilityObserver { |
| 79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockDocumentVisibilityObserver); | 79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockDocumentVisibilityObserver); |
| 80 public: | 80 public: |
| 81 static PassOwnPtrWillBeRawPtr<MockDocumentVisibilityObserver> create(Documen
t& document) | 81 static PassOwnPtrWillBeRawPtr<MockDocumentVisibilityObserver> create(Documen
t& document) |
| 82 { | 82 { |
| 83 return adoptPtrWillBeNoop(new MockDocumentVisibilityObserver(document)); | 83 return adoptPtrWillBeNoop(new MockDocumentVisibilityObserver(document)); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 for (auto test : tests) { | 350 for (auto test : tests) { |
| 351 document().setReferrerPolicy(ReferrerPolicyDefault); | 351 document().setReferrerPolicy(ReferrerPolicyDefault); |
| 352 | 352 |
| 353 document().processReferrerPolicy(test.policy); | 353 document().processReferrerPolicy(test.policy); |
| 354 EXPECT_EQ(test.expected, document().referrerPolicy()) << test.policy; | 354 EXPECT_EQ(test.expected, document().referrerPolicy()) << test.policy; |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace blink | 358 } // namespace blink |
| OLD | NEW |