| OLD | NEW |
| 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 Loading... |
| 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( | 6867 virtual void addNavigationTransitionData(const WebTransitionElementData& dat
a) override |
| 6868 const WebString& allowedDestinationOrigin, | |
| 6869 const WebString& selector, | |
| 6870 const WebString& markup, | |
| 6871 const WebVector<WebString>& names, | |
| 6872 const WebVector<WebRect>& rects) override | |
| 6873 { | 6868 { |
| 6874 m_navigationalDataReceivedCount++; | 6869 m_navigationalDataReceivedCount++; |
| 6875 } | 6870 } |
| 6876 | 6871 |
| 6877 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override | 6872 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override |
| 6878 { | 6873 { |
| 6879 m_provisionalLoadCount++; | 6874 m_provisionalLoadCount++; |
| 6880 m_wasLastProvisionalLoadATransition = isTransitionNavigation; | 6875 m_wasLastProvisionalLoadATransition = isTransitionNavigation; |
| 6881 } | 6876 } |
| 6882 | 6877 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6921 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6916 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6922 | 6917 |
| 6923 // Neither should a page reload. | 6918 // Neither should a page reload. |
| 6924 localFrame->reload(); | 6919 localFrame->reload(); |
| 6925 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6920 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 6926 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6921 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 6927 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6922 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6928 } | 6923 } |
| 6929 | 6924 |
| 6930 } // namespace | 6925 } // namespace |
| OLD | NEW |