| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 | 6 |
| 7 #include "base/shared_memory.h" | 7 #include "base/shared_memory.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "content/common/intents_messages.h" | 10 #include "content/common/intents_messages.h" |
| 11 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
| 12 #include "content/public/browser/native_web_keyboard_event.h" | 12 #include "content/public/browser/native_web_keyboard_event.h" |
| 13 #include "content/public/browser/web_ui_controller_factory.h" | 13 #include "content/public/browser/web_ui_controller_factory.h" |
| 14 #include "content/public/common/bindings_policy.h" | 14 #include "content/public/common/bindings_policy.h" |
| 15 #include "content/public/common/url_constants.h" | 15 #include "content/public/common/url_constants.h" |
| 16 #include "content/public/test/render_view_test.h" | 16 #include "content/public/test/render_view_test.h" |
| 17 #include "content/renderer/render_view_impl.h" | 17 #include "content/renderer/render_view_impl.h" |
| 18 #include "content/shell/shell_content_browser_client.h" |
| 18 #include "content/shell/shell_content_client.h" | 19 #include "content/shell/shell_content_client.h" |
| 19 #include "content/shell/shell_content_browser_client.h" | |
| 20 #include "content/shell/shell_main_delegate.h" | 20 #include "content/shell/shell_main_delegate.h" |
| 21 #include "content/test/mock_keyboard.h" | 21 #include "content/test/mock_keyboard.h" |
| 22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.
h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.
h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 32 #include "ui/base/keycodes/keyboard_codes.h" | 32 #include "ui/base/keycodes/keyboard_codes.h" |
| 33 #include "ui/base/range/range.h" | 33 #include "ui/base/range/range.h" |
| 34 #include "ui/gfx/codec/jpeg_codec.h" | 34 #include "ui/gfx/codec/jpeg_codec.h" |
| 35 #include "webkit/glue/glue_serialize.h" | 35 #include "webkit/glue/glue_serialize.h" |
| 36 #include "webkit/glue/web_io_operators.h" | 36 #include "webkit/glue/web_io_operators.h" |
| 37 | 37 |
| 38 #if defined(OS_LINUX) && !defined(USE_AURA) | 38 #if defined(OS_LINUX) && !defined(USE_AURA) |
| 39 #include "ui/base/gtk/event_synthesis_gtk.h" | 39 #include "ui/base/gtk/event_synthesis_gtk.h" |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 #if defined(USE_AURA) | 42 #if defined(USE_AURA) |
| 43 #include "ui/base/event.h" | 43 #include "ui/base/events/event.h" |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 #if defined(USE_AURA) && defined(USE_X11) | 46 #if defined(USE_AURA) && defined(USE_X11) |
| 47 #include <X11/Xlib.h> | 47 #include <X11/Xlib.h> |
| 48 #include "ui/base/events.h" | 48 #include "ui/base/events/event_constants.h" |
| 49 #include "ui/base/keycodes/keyboard_code_conversion.h" | 49 #include "ui/base/keycodes/keyboard_code_conversion.h" |
| 50 #include "ui/base/x/x11_util.h" | 50 #include "ui/base/x/x11_util.h" |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 using WebKit::WebFrame; | 53 using WebKit::WebFrame; |
| 54 using WebKit::WebInputEvent; | 54 using WebKit::WebInputEvent; |
| 55 using WebKit::WebMouseEvent; | 55 using WebKit::WebMouseEvent; |
| 56 using WebKit::WebString; | 56 using WebKit::WebString; |
| 57 using WebKit::WebTextDirection; | 57 using WebKit::WebTextDirection; |
| 58 using WebKit::WebURLError; | 58 using WebKit::WebURLError; |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 // It should work even when the zoom limit is temporarily changed in the page. | 1726 // It should work even when the zoom limit is temporarily changed in the page. |
| 1727 view()->GetWebView()->zoomLimitsChanged( | 1727 view()->GetWebView()->zoomLimitsChanged( |
| 1728 WebKit::WebView::zoomFactorToZoomLevel(1.0), | 1728 WebKit::WebView::zoomFactorToZoomLevel(1.0), |
| 1729 WebKit::WebView::zoomFactorToZoomLevel(1.0)); | 1729 WebKit::WebView::zoomFactorToZoomLevel(1.0)); |
| 1730 params.url = GURL("data:text/html,max_zoomlimit_test"); | 1730 params.url = GURL("data:text/html,max_zoomlimit_test"); |
| 1731 view()->OnSetZoomLevelForLoadingURL(params.url, kMaxZoomLevel); | 1731 view()->OnSetZoomLevelForLoadingURL(params.url, kMaxZoomLevel); |
| 1732 view()->OnNavigate(params); | 1732 view()->OnNavigate(params); |
| 1733 ProcessPendingMessages(); | 1733 ProcessPendingMessages(); |
| 1734 EXPECT_DOUBLE_EQ(kMaxZoomLevel, view()->GetWebView()->zoomLevel()); | 1734 EXPECT_DOUBLE_EQ(kMaxZoomLevel, view()->GetWebView()->zoomLevel()); |
| 1735 } | 1735 } |
| OLD | NEW |