Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Side by Side Diff: Source/web/tests/WebViewTest.cpp

Issue 219163005: Move dispatchUnloadEvent to WebFrame, part 1/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient); 1479 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient);
1480 m_webViewHelper.reset(); 1480 m_webViewHelper.reset();
1481 EXPECT_EQ(0, frameClient.count()); 1481 EXPECT_EQ(0, frameClient.count());
1482 } 1482 }
1483 1483
1484 TEST_F(WebViewTest, AddFrameInCloseURLUnload) 1484 TEST_F(WebViewTest, AddFrameInCloseURLUnload)
1485 { 1485 {
1486 CreateChildCounterFrameClient frameClient; 1486 CreateChildCounterFrameClient frameClient;
1487 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("add_frame_in_unload.html")); 1487 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("add_frame_in_unload.html"));
1488 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient); 1488 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient);
1489 m_webViewHelper.webViewImpl()->dispatchUnloadEvent(); 1489 m_webViewHelper.webViewImpl()->mainFrame()->dispatchUnloadEvent();
1490 EXPECT_EQ(0, frameClient.count()); 1490 EXPECT_EQ(0, frameClient.count());
1491 m_webViewHelper.reset(); 1491 m_webViewHelper.reset();
1492 } 1492 }
1493 1493
1494 TEST_F(WebViewTest, AddFrameInNavigateUnload) 1494 TEST_F(WebViewTest, AddFrameInNavigateUnload)
1495 { 1495 {
1496 CreateChildCounterFrameClient frameClient; 1496 CreateChildCounterFrameClient frameClient;
1497 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("add_frame_in_unload.html")); 1497 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("add_frame_in_unload.html"));
1498 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient); 1498 m_webViewHelper.initializeAndLoad(m_baseURL + "add_frame_in_unload.html", tr ue, &frameClient);
1499 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(), "about:b lank"); 1499 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(), "about:b lank");
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 testSelectionRootBounds("select_range_iframe_textarea_overflow.html", 1.0f); 1735 testSelectionRootBounds("select_range_iframe_textarea_overflow.html", 1.0f);
1736 1736
1737 // Basic page with scale factor. 1737 // Basic page with scale factor.
1738 testSelectionRootBounds("select_range_basic.html", 0.0f); 1738 testSelectionRootBounds("select_range_basic.html", 0.0f);
1739 testSelectionRootBounds("select_range_basic.html", 0.1f); 1739 testSelectionRootBounds("select_range_basic.html", 0.1f);
1740 testSelectionRootBounds("select_range_basic.html", 1.5f); 1740 testSelectionRootBounds("select_range_basic.html", 1.5f);
1741 testSelectionRootBounds("select_range_basic.html", 2.0f); 1741 testSelectionRootBounds("select_range_basic.html", 2.0f);
1742 } 1742 }
1743 1743
1744 } // namespace 1744 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698