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