| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 | 1069 |
| 1070 TEST_F(WebViewTest, ExitingDeviceEmulationResetsPageScale) | 1070 TEST_F(WebViewTest, ExitingDeviceEmulationResetsPageScale) |
| 1071 { | 1071 { |
| 1072 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("200-by-300.html")); | 1072 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("200-by-300.html")); |
| 1073 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(m_baseURL + "20
0-by-300.html"); | 1073 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(m_baseURL + "20
0-by-300.html"); |
| 1074 webViewImpl->resize(WebSize(200, 300)); | 1074 webViewImpl->resize(WebSize(200, 300)); |
| 1075 | 1075 |
| 1076 float pageScaleExpected = webViewImpl->pageScaleFactor(); | 1076 float pageScaleExpected = webViewImpl->pageScaleFactor(); |
| 1077 | 1077 |
| 1078 WebDeviceEmulationParams params; | 1078 WebDeviceEmulationParams params; |
| 1079 params.screenPosition = WebDeviceEmulationParams::Desktop; | 1079 params.screenPosition = WebDeviceEmulationParams::Mobile; |
| 1080 params.deviceScaleFactor = 0; | 1080 params.deviceScaleFactor = 0; |
| 1081 params.fitToView = false; | 1081 params.fitToView = false; |
| 1082 params.offset = WebFloatPoint(); | 1082 params.offset = WebFloatPoint(); |
| 1083 params.scale = 1; | 1083 params.scale = 1; |
| 1084 | 1084 |
| 1085 webViewImpl->enableDeviceEmulation(params); | 1085 webViewImpl->enableDeviceEmulation(params); |
| 1086 | 1086 |
| 1087 webViewImpl->setPageScaleFactor(2); | 1087 webViewImpl->setPageScaleFactor(2); |
| 1088 | 1088 |
| 1089 webViewImpl->disableDeviceEmulation(); | 1089 webViewImpl->disableDeviceEmulation(); |
| (...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3132 frame->setAutofillClient(&client); | 3132 frame->setAutofillClient(&client); |
| 3133 webView->setInitialFocus(false); | 3133 webView->setInitialFocus(false); |
| 3134 | 3134 |
| 3135 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); | 3135 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); |
| 3136 EXPECT_EQ(1, client.textChangesFromUserGesture()); | 3136 EXPECT_EQ(1, client.textChangesFromUserGesture()); |
| 3137 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); | 3137 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); |
| 3138 frame->setAutofillClient(0); | 3138 frame->setAutofillClient(0); |
| 3139 } | 3139 } |
| 3140 | 3140 |
| 3141 } // namespace blink | 3141 } // namespace blink |
| OLD | NEW |