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 4616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4627 registerMockedHttpURLLoad("fragment_middle_click.html"); | 4627 registerMockedHttpURLLoad("fragment_middle_click.html"); |
4628 TestNavigationPolicyWebFrameClient client; | 4628 TestNavigationPolicyWebFrameClient client; |
4629 FrameTestHelpers::WebViewHelper webViewHelper; | 4629 FrameTestHelpers::WebViewHelper webViewHelper; |
4630 webViewHelper.initializeAndLoad(m_baseURL + "fragment_middle_click.html", tr
ue, &client); | 4630 webViewHelper.initializeAndLoad(m_baseURL + "fragment_middle_click.html", tr
ue, &client); |
4631 | 4631 |
4632 WebCore::Document* document = webViewHelper.webViewImpl()->page()->mainFrame
()->document(); | 4632 WebCore::Document* document = webViewHelper.webViewImpl()->page()->mainFrame
()->document(); |
4633 WebCore::KURL destination = document->url(); | 4633 WebCore::KURL destination = document->url(); |
4634 destination.setFragmentIdentifier("test"); | 4634 destination.setFragmentIdentifier("test"); |
4635 | 4635 |
4636 RefPtr<WebCore::Event> event = WebCore::MouseEvent::create(WebCore::EventTyp
eNames::click, false, false, | 4636 RefPtr<WebCore::Event> event = WebCore::MouseEvent::create(WebCore::EventTyp
eNames::click, false, false, |
4637 document->domWindow(), 0, 0, 0, 0, 0, 0, 0, false, false, false, false,
1, 0, 0); | 4637 document->domWindow(), 0, 0, 0, 0, 0, 0, 0, false, false, false, false,
1, nullptr, nullptr); |
4638 WebCore::FrameLoadRequest frameRequest(document, WebCore::ResourceRequest(de
stination)); | 4638 WebCore::FrameLoadRequest frameRequest(document, WebCore::ResourceRequest(de
stination)); |
4639 frameRequest.setTriggeringEvent(event); | 4639 frameRequest.setTriggeringEvent(event); |
4640 webViewHelper.webViewImpl()->page()->mainFrame()->loader().load(frameRequest
); | 4640 webViewHelper.webViewImpl()->page()->mainFrame()->loader().load(frameRequest
); |
4641 } | 4641 } |
4642 | 4642 |
4643 TEST_F(WebFrameTest, BackToReload) | 4643 TEST_F(WebFrameTest, BackToReload) |
4644 { | 4644 { |
4645 registerMockedHttpURLLoad("fragment_middle_click.html"); | 4645 registerMockedHttpURLLoad("fragment_middle_click.html"); |
4646 FrameTestHelpers::WebViewHelper webViewHelper; | 4646 FrameTestHelpers::WebViewHelper webViewHelper; |
4647 webViewHelper.initializeAndLoad(m_baseURL + "fragment_middle_click.html", tr
ue); | 4647 webViewHelper.initializeAndLoad(m_baseURL + "fragment_middle_click.html", tr
ue); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5162 webViewHelper.initializeAndLoad("about:blank"); | 5162 webViewHelper.initializeAndLoad("about:blank"); |
5163 | 5163 |
5164 WebCore::FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()
->frameView(); | 5164 WebCore::FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()
->frameView(); |
5165 frameView->setFrameRect(WebCore::IntRect(0, 0, 200, 200)); | 5165 frameView->setFrameRect(WebCore::IntRect(0, 0, 200, 200)); |
5166 EXPECT_EQ_RECT(WebCore::IntRect(0, 0, 200, 200), frameView->frameRect()); | 5166 EXPECT_EQ_RECT(WebCore::IntRect(0, 0, 200, 200), frameView->frameRect()); |
5167 frameView->setFrameRect(WebCore::IntRect(100, 100, 200, 200)); | 5167 frameView->setFrameRect(WebCore::IntRect(100, 100, 200, 200)); |
5168 EXPECT_EQ_RECT(WebCore::IntRect(100, 100, 200, 200), frameView->frameRect())
; | 5168 EXPECT_EQ_RECT(WebCore::IntRect(100, 100, 200, 200), frameView->frameRect())
; |
5169 } | 5169 } |
5170 | 5170 |
5171 } // namespace | 5171 } // namespace |
OLD | NEW |