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

Side by Side Diff: Source/web/tests/WebDocumentTest.cpp

Issue 476553002: Navigation transitions: Hide transition elements by setting CSS opacity rather than display. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test fix Created 6 years, 4 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
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "public/web/WebDocument.h" 7 #include "public/web/WebDocument.h"
8 8
9 #include "core/CSSPropertyNames.h" 9 #include "core/CSSPropertyNames.h"
10 #include "core/dom/NodeRenderStyle.h" 10 #include "core/dom/NodeRenderStyle.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ASSERT_EQ(Color(0, 0, 0), bodyStyle->visitedDependentColor(blink::CSSPropert yColor)); 91 ASSERT_EQ(Color(0, 0, 0), bodyStyle->visitedDependentColor(blink::CSSPropert yColor));
92 92
93 frame->document().beginExitTransition("#foo"); 93 frame->document().beginExitTransition("#foo");
94 94
95 // Make sure the stylesheet load request gets processed. 95 // Make sure the stylesheet load request gets processed.
96 FrameTestHelpers::pumpPendingRequestsDoNotUse(frame); 96 FrameTestHelpers::pumpPendingRequestsDoNotUse(frame);
97 coreDoc->updateRenderTreeIfNeeded(); 97 coreDoc->updateRenderTreeIfNeeded();
98 98
99 // The element should now be hidden. 99 // The element should now be hidden.
100 transitionStyle = transitionElement->renderStyle(); 100 transitionStyle = transitionElement->renderStyle();
101 ASSERT_FALSE(transitionStyle); 101 ASSERT_TRUE(transitionStyle);
102 ASSERT_EQ(transitionStyle->opacity(), 0);
102 103
103 // The stylesheet should now have been applied. 104 // The stylesheet should now have been applied.
104 bodyStyle = bodyElement->renderStyle(); 105 bodyStyle = bodyElement->renderStyle();
105 ASSERT(bodyStyle); 106 ASSERT(bodyStyle);
106 ASSERT_EQ(Color(0, 128, 0), bodyStyle->visitedDependentColor(blink::CSSPrope rtyColor)); 107 ASSERT_EQ(Color(0, 128, 0), bodyStyle->visitedDependentColor(blink::CSSPrope rtyColor));
107 } 108 }
108 109
109 } 110 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698