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 6812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6823 EXPECT_FALSE(client.failed()); | 6823 EXPECT_FALSE(client.failed()); |
6824 } | 6824 } |
6825 | 6825 |
6826 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test
WebFrameClient { | 6826 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test
WebFrameClient { |
6827 public: | 6827 public: |
6828 NavigationTransitionCallbackWebFrameClient() | 6828 NavigationTransitionCallbackWebFrameClient() |
6829 : m_navigationalDataReceivedCount(0) | 6829 : m_navigationalDataReceivedCount(0) |
6830 , m_provisionalLoadCount(0) | 6830 , m_provisionalLoadCount(0) |
6831 , m_wasLastProvisionalLoadATransition(false) { } | 6831 , m_wasLastProvisionalLoadATransition(false) { } |
6832 | 6832 |
6833 virtual void addNavigationTransitionData(const WebString& allowedDestination
Origin, const WebString& selector, const WebString& markup) override | 6833 virtual void addNavigationTransitionData( |
| 6834 const WebString& allowedDestinationOrigin, |
| 6835 const WebString& selector, |
| 6836 const WebString& markup, |
| 6837 const WebVector<WebString>& names, |
| 6838 const WebVector<WebRect>& rects) override |
6834 { | 6839 { |
6835 m_navigationalDataReceivedCount++; | 6840 m_navigationalDataReceivedCount++; |
6836 } | 6841 } |
6837 | 6842 |
6838 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override | 6843 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override |
6839 { | 6844 { |
6840 m_provisionalLoadCount++; | 6845 m_provisionalLoadCount++; |
6841 m_wasLastProvisionalLoadATransition = isTransitionNavigation; | 6846 m_wasLastProvisionalLoadATransition = isTransitionNavigation; |
6842 } | 6847 } |
6843 | 6848 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6882 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6887 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6883 | 6888 |
6884 // Neither should a page reload. | 6889 // Neither should a page reload. |
6885 localFrame->reload(); | 6890 localFrame->reload(); |
6886 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6891 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
6887 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6892 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
6888 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6893 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6889 } | 6894 } |
6890 | 6895 |
6891 } // namespace | 6896 } // namespace |
OLD | NEW |