OLD | NEW |
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 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 TEST_F(WebViewTest, SmartClipData) | 1637 TEST_F(WebViewTest, SmartClipData) |
1638 { | 1638 { |
1639 static const char* kExpectedClipText = "\nPrice 10,000,000won"; | 1639 static const char* kExpectedClipText = "\nPrice 10,000,000won"; |
1640 static const char* kExpectedClipHtml = | 1640 static const char* kExpectedClipHtml = |
1641 "<div id=\"div4\" style=\"padding: 10px; margin: 10px; border: 2px " | 1641 "<div id=\"div4\" style=\"padding: 10px; margin: 10px; border: 2px " |
1642 "solid rgb(135, 206, 235); float: left; width: 190px; height: 30px; " | 1642 "solid rgb(135, 206, 235); float: left; width: 190px; height: 30px; " |
1643 "color: rgb(0, 0, 0); font-family: myahem; font-size: 8px; font-style: " | 1643 "color: rgb(0, 0, 0); font-family: myahem; font-size: 8px; font-style: " |
1644 "normal; font-variant: normal; font-weight: normal; letter-spacing: " | 1644 "normal; font-variant: normal; font-weight: normal; letter-spacing: " |
1645 "normal; line-height: normal; orphans: auto; text-align: start; " | 1645 "normal; line-height: normal; orphans: auto; text-align: start; " |
1646 "text-indent: 0px; text-transform: none; white-space: normal; widows: " | 1646 "text-indent: 0px; text-transform: none; white-space: normal; widows: " |
1647 "auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Air " | 1647 "1; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Air " |
1648 "conditioner</div><div id=\"div5\" style=\"padding: 10px; margin: " | 1648 "conditioner</div><div id=\"div5\" style=\"padding: 10px; margin: " |
1649 "10px; border: 2px solid rgb(135, 206, 235); float: left; width: " | 1649 "10px; border: 2px solid rgb(135, 206, 235); float: left; width: " |
1650 "190px; height: 30px; color: rgb(0, 0, 0); font-family: myahem; " | 1650 "190px; height: 30px; color: rgb(0, 0, 0); font-family: myahem; " |
1651 "font-size: 8px; font-style: normal; font-variant: normal; " | 1651 "font-size: 8px; font-style: normal; font-variant: normal; " |
1652 "font-weight: normal; letter-spacing: normal; line-height: normal; " | 1652 "font-weight: normal; letter-spacing: normal; line-height: normal; " |
1653 "orphans: auto; text-align: start; text-indent: 0px; text-transform: " | 1653 "orphans: auto; text-align: start; text-indent: 0px; text-transform: " |
1654 "none; white-space: normal; widows: auto; word-spacing: 0px; " | 1654 "none; white-space: normal; widows: 1; word-spacing: 0px; " |
1655 "-webkit-text-stroke-width: 0px;\">Price 10,000,000won</div>"; | 1655 "-webkit-text-stroke-width: 0px;\">Price 10,000,000won</div>"; |
1656 WebString clipText; | 1656 WebString clipText; |
1657 WebString clipHtml; | 1657 WebString clipHtml; |
1658 WebRect clipRect; | 1658 WebRect clipRect; |
1659 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("Ahem.ttf")); | 1659 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("Ahem.ttf")); |
1660 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("smartclip.html")); | 1660 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("smartclip.html")); |
1661 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "smartclip.
html"); | 1661 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "smartclip.
html"); |
1662 webView->setPageScaleFactorLimits(1, 1); | 1662 webView->setPageScaleFactorLimits(1, 1); |
1663 webView->resize(WebSize(500, 500)); | 1663 webView->resize(WebSize(500, 500)); |
1664 webView->layout(); | 1664 webView->layout(); |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 EXPECT_EQ(100, size.width); | 2172 EXPECT_EQ(100, size.width); |
2173 EXPECT_EQ(100, size.height); | 2173 EXPECT_EQ(100, size.height); |
2174 | 2174 |
2175 webView->setZoomLevel(WebView::zoomFactorToZoomLevel(2.0)); | 2175 webView->setZoomLevel(WebView::zoomFactorToZoomLevel(2.0)); |
2176 size = webView->contentsPreferredMinimumSize(); | 2176 size = webView->contentsPreferredMinimumSize(); |
2177 EXPECT_EQ(200, size.width); | 2177 EXPECT_EQ(200, size.width); |
2178 EXPECT_EQ(200, size.height); | 2178 EXPECT_EQ(200, size.height); |
2179 } | 2179 } |
2180 | 2180 |
2181 } // namespace | 2181 } // namespace |
OLD | NEW |