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

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

Issue 654953002: Navigation transitions (web to native app): Get names and rects of transition elements (Step 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fix Created 6 years, 1 month 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/FrameLoaderClientImpl.cpp ('k') | public/web/WebFrameClient.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 6846 matching lines...) Expand 10 before | Expand all | Expand 10 after
6857 EXPECT_FALSE(client.failed()); 6857 EXPECT_FALSE(client.failed());
6858 } 6858 }
6859 6859
6860 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test WebFrameClient { 6860 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test WebFrameClient {
6861 public: 6861 public:
6862 NavigationTransitionCallbackWebFrameClient() 6862 NavigationTransitionCallbackWebFrameClient()
6863 : m_navigationalDataReceivedCount(0) 6863 : m_navigationalDataReceivedCount(0)
6864 , m_provisionalLoadCount(0) 6864 , m_provisionalLoadCount(0)
6865 , m_wasLastProvisionalLoadATransition(false) { } 6865 , m_wasLastProvisionalLoadATransition(false) { }
6866 6866
6867 virtual void addNavigationTransitionData(const WebString& allowedDestination Origin, const WebString& selector, const WebString& markup) override 6867 virtual void addNavigationTransitionData(
6868 const WebString& allowedDestinationOrigin,
6869 const WebString& selector,
6870 const WebString& markup,
6871 const WebVector<WebString>& names,
6872 const WebVector<WebRect>& rects) override
6868 { 6873 {
6869 m_navigationalDataReceivedCount++; 6874 m_navigationalDataReceivedCount++;
6870 } 6875 }
6871 6876
6872 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans itionNavigation) override 6877 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans itionNavigation) override
6873 { 6878 {
6874 m_provisionalLoadCount++; 6879 m_provisionalLoadCount++;
6875 m_wasLastProvisionalLoadATransition = isTransitionNavigation; 6880 m_wasLastProvisionalLoadATransition = isTransitionNavigation;
6876 } 6881 }
6877 6882
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
6916 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6921 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6917 6922
6918 // Neither should a page reload. 6923 // Neither should a page reload.
6919 localFrame->reload(); 6924 localFrame->reload();
6920 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6925 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6921 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6926 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6922 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6927 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6923 } 6928 }
6924 6929
6925 } // namespace 6930 } // namespace
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698