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

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

Issue 653223002: Navigation transitions (web to native app): Revert exit transition (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fix Created 6 years 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/web/WebDocument.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 // Show transition elements 176 // Show transition elements
177 frame->document().showTransitionElements("#foo"); 177 frame->document().showTransitionElements("#foo");
178 FrameTestHelpers::pumpPendingRequestsDoNotUse(frame); 178 FrameTestHelpers::pumpPendingRequestsDoNotUse(frame);
179 coreDoc->updateRenderTreeIfNeeded(); 179 coreDoc->updateRenderTreeIfNeeded();
180 transitionStyle = transitionElement->renderStyle(); 180 transitionStyle = transitionElement->renderStyle();
181 ASSERT_TRUE(transitionStyle); 181 ASSERT_TRUE(transitionStyle);
182 EXPECT_EQ(transitionStyle->opacity(), 1); 182 EXPECT_EQ(transitionStyle->opacity(), 1);
183 } 183 }
184 184
185
186 TEST(WebDocumentTest, SetIsTransitionDocument)
187 {
188 std::string baseURL = "http://www.test.com:0/";
189 const char* htmlURL = "transition_exit.html";
190 const char* cssURL = "transition_exit.css";
191 URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + htmlURL), WebString:: fromUTF8(htmlURL));
192 URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + cssURL), WebString::f romUTF8(cssURL));
193
194 WebViewHelper webViewHelper;
195 webViewHelper.initializeAndLoad(baseURL + htmlURL);
196
197 WebFrame* frame = webViewHelper.webView()->mainFrame();
198 Document* coreDoc = toLocalFrame(webViewHelper.webViewImpl()->page()->mainFr ame())->document();
199
200 ASSERT_FALSE(coreDoc->isTransitionDocument());
201
202 frame->document().setIsTransitionDocument(true);
203 ASSERT_TRUE(coreDoc->isTransitionDocument());
204
205 frame->document().setIsTransitionDocument(false);
206 ASSERT_FALSE(coreDoc->isTransitionDocument());
185 } 207 }
208
209 }
OLDNEW
« no previous file with comments | « Source/web/WebDocument.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698