OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015, Google Inc. All rights reserved. | 2 * Copyright (c) 2015, 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 { | 78 { |
79 return adoptPtrWillBeNoop(new StubFrameOwner); | 79 return adoptPtrWillBeNoop(new StubFrameOwner); |
80 } | 80 } |
81 | 81 |
82 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } | 82 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } |
83 | 83 |
84 bool isLocal() const override { return false; } | 84 bool isLocal() const override { return false; } |
85 SandboxFlags sandboxFlags() const override { return SandboxNone; } | 85 SandboxFlags sandboxFlags() const override { return SandboxNone; } |
86 void dispatchLoad() override { } | 86 void dispatchLoad() override { } |
87 void renderFallbackContent() override { } | 87 void renderFallbackContent() override { } |
| 88 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } |
| 89 int marginWidth() const override { return -1; } |
| 90 int marginHeight() const override { return -1; } |
88 }; | 91 }; |
89 | 92 |
90 class FrameFetchContextTest : public ::testing::Test { | 93 class FrameFetchContextTest : public ::testing::Test { |
91 protected: | 94 protected: |
92 void SetUp() override | 95 void SetUp() override |
93 { | 96 { |
94 dummyPageHolder = DummyPageHolder::create(IntSize(500, 500)); | 97 dummyPageHolder = DummyPageHolder::create(IntSize(500, 500)); |
95 dummyPageHolder->page().setDeviceScaleFactor(1.0); | 98 dummyPageHolder->page().setDeviceScaleFactor(1.0); |
96 documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), Resou
rceRequest("http://www.example.com"), SubstituteData()); | 99 documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), Resou
rceRequest("http://www.example.com"), SubstituteData()); |
97 document = toHTMLDocument(&dummyPageHolder->document()); | 100 document = toHTMLDocument(&dummyPageHolder->document()); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 EXPECT_EQ(ResourceLoadPriorityVeryHigh, childFetchContext->modifyPriorityFor
Experiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request, Resou
rcePriority::NotVisible)); | 509 EXPECT_EQ(ResourceLoadPriorityVeryHigh, childFetchContext->modifyPriorityFor
Experiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request, Resou
rcePriority::NotVisible)); |
507 EXPECT_EQ(ResourceLoadPriorityMedium, childFetchContext->modifyPriorityForEx
periments(ResourceLoadPriorityMedium, Resource::Script, request, ResourcePriorit
y::NotVisible)); | 510 EXPECT_EQ(ResourceLoadPriorityMedium, childFetchContext->modifyPriorityForEx
periments(ResourceLoadPriorityMedium, Resource::Script, request, ResourcePriorit
y::NotVisible)); |
508 | 511 |
509 // Low priority iframes enabled, everything should be low priority | 512 // Low priority iframes enabled, everything should be low priority |
510 settings->setLowPriorityIframes(true); | 513 settings->setLowPriorityIframes(true); |
511 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE
xperiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request, Resour
cePriority::NotVisible)); | 514 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE
xperiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request, Resour
cePriority::NotVisible)); |
512 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE
xperiments(ResourceLoadPriorityMedium, Resource::Script, request, ResourcePriori
ty::NotVisible)); | 515 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE
xperiments(ResourceLoadPriorityMedium, Resource::Script, request, ResourcePriori
ty::NotVisible)); |
513 } | 516 } |
514 | 517 |
515 } // namespace | 518 } // namespace |
OLD | NEW |