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 6747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6758 EXPECT_FALSE(client.failed()); | 6758 EXPECT_FALSE(client.failed()); |
6759 } | 6759 } |
6760 | 6760 |
6761 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test
WebFrameClient { | 6761 class NavigationTransitionCallbackWebFrameClient : public FrameTestHelpers::Test
WebFrameClient { |
6762 public: | 6762 public: |
6763 NavigationTransitionCallbackWebFrameClient() | 6763 NavigationTransitionCallbackWebFrameClient() |
6764 : m_navigationalDataReceivedCount(0) | 6764 : m_navigationalDataReceivedCount(0) |
6765 , m_provisionalLoadCount(0) | 6765 , m_provisionalLoadCount(0) |
6766 , m_wasLastProvisionalLoadATransition(false) { } | 6766 , m_wasLastProvisionalLoadATransition(false) { } |
6767 | 6767 |
6768 virtual void addNavigationTransitionData(const WebString& allowedDestination
Origin, const WebString& selector, const WebString& markup) override | 6768 virtual void addNavigationTransitionData( |
| 6769 const WebString& allowedDestinationOrigin, |
| 6770 const WebString& selector, |
| 6771 const WebString& markup, |
| 6772 const WebVector<WebString>& names, |
| 6773 const WebVector<WebRect>& rects) override |
6769 { | 6774 { |
6770 m_navigationalDataReceivedCount++; | 6775 m_navigationalDataReceivedCount++; |
6771 } | 6776 } |
6772 | 6777 |
6773 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override | 6778 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation) override |
6774 { | 6779 { |
6775 m_provisionalLoadCount++; | 6780 m_provisionalLoadCount++; |
6776 m_wasLastProvisionalLoadATransition = isTransitionNavigation; | 6781 m_wasLastProvisionalLoadATransition = isTransitionNavigation; |
6777 } | 6782 } |
6778 | 6783 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6817 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6822 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6818 | 6823 |
6819 // Neither should a page reload. | 6824 // Neither should a page reload. |
6820 localFrame->reload(); | 6825 localFrame->reload(); |
6821 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6826 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
6822 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6827 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
6823 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6828 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6824 } | 6829 } |
6825 | 6830 |
6826 } // namespace | 6831 } // namespace |
OLD | NEW |