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 3364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 destination.setFragmentIdentifier("test"); | 3375 destination.setFragmentIdentifier("test"); |
3376 | 3376 |
3377 RefPtr<WebCore::Event> event = WebCore::MouseEvent::create(WebCore::eventNam
es().clickEvent, false, false, | 3377 RefPtr<WebCore::Event> event = WebCore::MouseEvent::create(WebCore::eventNam
es().clickEvent, false, false, |
3378 document->defaultView(), 0, 0, 0, 0, 0, 0, 0, false, false, false, false
, 1, 0, 0); | 3378 document->defaultView(), 0, 0, 0, 0, 0, 0, 0, false, false, false, false
, 1, 0, 0); |
3379 webViewImpl->page()->mainFrame()->loader()->urlSelected(destination, "", eve
nt.release(), false, WebCore::MaybeSendReferrer); | 3379 webViewImpl->page()->mainFrame()->loader()->urlSelected(destination, "", eve
nt.release(), false, WebCore::MaybeSendReferrer); |
3380 | 3380 |
3381 m_webView->close(); | 3381 m_webView->close(); |
3382 m_webView = 0; | 3382 m_webView = 0; |
3383 } | 3383 } |
3384 | 3384 |
| 3385 TEST_F(WebFrameTest, BackToReload) |
| 3386 { |
| 3387 registerMockedHttpURLLoad("fragment_middle_click.html"); |
| 3388 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "fragment_mid
dle_click.html", true); |
| 3389 WebFrame* frame = m_webView->mainFrame(); |
| 3390 WebHistoryItem firstItem = frame->currentHistoryItem(); |
| 3391 EXPECT_FALSE(firstItem.isNull()); |
| 3392 |
| 3393 registerMockedHttpURLLoad("white-1x1.png"); |
| 3394 FrameTestHelpers::loadFrame(frame, m_baseURL + "white-1x1.png"); |
| 3395 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 3396 EXPECT_FALSE(frame->previousHistoryItem().isNull()); |
| 3397 EXPECT_EQ(firstItem.urlString(), frame->previousHistoryItem().urlString()); |
| 3398 |
| 3399 frame->loadHistoryItem(frame->previousHistoryItem()); |
| 3400 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 3401 EXPECT_EQ(firstItem.urlString(), frame->currentHistoryItem().urlString()); |
| 3402 |
| 3403 frame->reload(); |
| 3404 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 3405 EXPECT_EQ(WebURLRequest::ReloadIgnoringCacheData, frame->dataSource()->reque
st().cachePolicy()); |
| 3406 |
| 3407 m_webView->close(); |
| 3408 m_webView = 0; |
| 3409 } |
| 3410 |
3385 | 3411 |
3386 } // namespace | 3412 } // namespace |
OLD | NEW |