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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebDocument.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebDocumentTest.cpp
diff --git a/Source/web/tests/WebDocumentTest.cpp b/Source/web/tests/WebDocumentTest.cpp
index 0a8d828deb9e70c5c1597f26ded685db5a06623a..2953bbe93a9e56974c3bb8301dc5ccda2a343012 100644
--- a/Source/web/tests/WebDocumentTest.cpp
+++ b/Source/web/tests/WebDocumentTest.cpp
@@ -182,4 +182,28 @@ TEST(WebDocumentTest, HideAndShowTransitionElements)
EXPECT_EQ(transitionStyle->opacity(), 1);
}
+
+TEST(WebDocumentTest, SetIsTransitionDocument)
+{
+ std::string baseURL = "http://www.test.com:0/";
+ const char* htmlURL = "transition_exit.html";
+ const char* cssURL = "transition_exit.css";
+ URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + htmlURL), WebString::fromUTF8(htmlURL));
+ URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + cssURL), WebString::fromUTF8(cssURL));
+
+ WebViewHelper webViewHelper;
+ webViewHelper.initializeAndLoad(baseURL + htmlURL);
+
+ WebFrame* frame = webViewHelper.webView()->mainFrame();
+ Document* coreDoc = toLocalFrame(webViewHelper.webViewImpl()->page()->mainFrame())->document();
+
+ ASSERT_FALSE(coreDoc->isTransitionDocument());
+
+ frame->document().setIsTransitionDocument(true);
+ ASSERT_TRUE(coreDoc->isTransitionDocument());
+
+ frame->document().setIsTransitionDocument(false);
+ ASSERT_FALSE(coreDoc->isTransitionDocument());
+}
+
}
« 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