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

Side by Side Diff: Source/web/tests/WebFrameTest.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/tests/WebDocumentTest.cpp ('k') | public/web/WebDocument.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 4844 matching lines...) Expand 10 before | Expand all | Expand 10 after
4855 frame->moveCaretSelection(WebPoint(0, 0)); 4855 frame->moveCaretSelection(WebPoint(0, 0));
4856 } 4856 }
4857 4857
4858 TEST_F(WebFrameTest, NavigateToSandboxedMarkup) 4858 TEST_F(WebFrameTest, NavigateToSandboxedMarkup)
4859 { 4859 {
4860 FrameTestHelpers::TestWebFrameClient webFrameClient; 4860 FrameTestHelpers::TestWebFrameClient webFrameClient;
4861 FrameTestHelpers::WebViewHelper webViewHelper; 4861 FrameTestHelpers::WebViewHelper webViewHelper;
4862 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad("about:blank", tr ue, &webFrameClient); 4862 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad("about:blank", tr ue, &webFrameClient);
4863 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webViewHelper.webView()->main Frame()); 4863 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webViewHelper.webView()->main Frame());
4864 4864
4865 frame->document().setIsTransitionDocument(); 4865 frame->document().setIsTransitionDocument(true);
4866 4866
4867 std::string markup("<div id='foo'></div><script>document.getElementById('foo ').setAttribute('dir', 'rtl')</script>"); 4867 std::string markup("<div id='foo'></div><script>document.getElementById('foo ').setAttribute('dir', 'rtl')</script>");
4868 frame->navigateToSandboxedMarkup(WebData(markup.data(), markup.length())); 4868 frame->navigateToSandboxedMarkup(WebData(markup.data(), markup.length()));
4869 4869
4870 webFrameClient.waitForLoadToComplete(); 4870 webFrameClient.waitForLoadToComplete();
4871 4871
4872 WebDocument document = webViewImpl->mainFrame()->document(); 4872 WebDocument document = webViewImpl->mainFrame()->document();
4873 WebElement transitionElement = document.getElementById("foo"); 4873 WebElement transitionElement = document.getElementById("foo");
4874 // Check that the markup got navigated to successfully. 4874 // Check that the markup got navigated to successfully.
4875 EXPECT_FALSE(transitionElement.isNull()); 4875 EXPECT_FALSE(transitionElement.isNull());
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
6924 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6924 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6925 6925
6926 // Neither should a page reload. 6926 // Neither should a page reload.
6927 localFrame->reload(); 6927 localFrame->reload();
6928 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6928 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6929 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6929 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6930 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6930 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6931 } 6931 }
6932 6932
6933 } // namespace 6933 } // namespace
OLDNEW
« no previous file with comments | « Source/web/tests/WebDocumentTest.cpp ('k') | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698