Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: Source/core/loader/FrameFetchContextTest.cpp

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments from Alex Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 EXPECT_EQ(ResourceLoadPriorityVeryHigh, childFetchContext->modifyPriorityFor Experiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request)); 500 EXPECT_EQ(ResourceLoadPriorityVeryHigh, childFetchContext->modifyPriorityFor Experiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request));
498 EXPECT_EQ(ResourceLoadPriorityMedium, childFetchContext->modifyPriorityForEx periments(ResourceLoadPriorityMedium, Resource::Script, request)); 501 EXPECT_EQ(ResourceLoadPriorityMedium, childFetchContext->modifyPriorityForEx periments(ResourceLoadPriorityMedium, Resource::Script, request));
499 502
500 // Low priority iframes enabled, everything should be low priority 503 // Low priority iframes enabled, everything should be low priority
501 settings->setLowPriorityIframes(true); 504 settings->setLowPriorityIframes(true);
502 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE xperiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request)); 505 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE xperiments(ResourceLoadPriorityVeryHigh, Resource::MainResource, request));
503 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE xperiments(ResourceLoadPriorityMedium, Resource::Script, request)); 506 EXPECT_EQ(ResourceLoadPriorityVeryLow, childFetchContext->modifyPriorityForE xperiments(ResourceLoadPriorityMedium, Resource::Script, request));
504 } 507 }
505 508
506 } // namespace 509 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698