| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/gfx/codec/jpeg_codec.h" | 5 #include "app/gfx/codec/jpeg_codec.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/shared_memory.h" | 7 #include "base/shared_memory.h" |
| 8 #include "chrome/common/native_web_keyboard_event.h" | 8 #include "chrome/common/native_web_keyboard_event.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/renderer/print_web_view_helper.h" | 10 #include "chrome/renderer/print_web_view_helper.h" |
| 11 #include "chrome/test/render_view_test.h" | 11 #include "chrome/test/render_view_test.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "printing/image.h" | 13 #include "printing/image.h" |
| 14 #include "printing/native_metafile.h" | 14 #include "printing/native_metafile.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "webkit/api/public/WebString.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 17 #include "webkit/api/public/WebURLError.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" |
| 18 | 18 |
| 19 using WebKit::WebCompositionCommand; | 19 using WebKit::WebCompositionCommand; |
| 20 using WebKit::WebFrame; | 20 using WebKit::WebFrame; |
| 21 using WebKit::WebString; | 21 using WebKit::WebString; |
| 22 using WebKit::WebTextDirection; | 22 using WebKit::WebTextDirection; |
| 23 using WebKit::WebURLError; | 23 using WebKit::WebURLError; |
| 24 | 24 |
| 25 static WebCompositionCommand ToCompositionCommand(int string_type) { | 25 static WebCompositionCommand ToCompositionCommand(int string_type) { |
| 26 switch (string_type) { | 26 switch (string_type) { |
| 27 default: | 27 default: |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 WebURLError error; | 912 WebURLError error; |
| 913 error.domain.fromUTF8("test_domain"); | 913 error.domain.fromUTF8("test_domain"); |
| 914 error.reason = net::ERR_ABORTED; | 914 error.reason = net::ERR_ABORTED; |
| 915 error.unreachableURL = GURL("http://foo"); | 915 error.unreachableURL = GURL("http://foo"); |
| 916 WebFrame* web_frame = GetMainFrame(); | 916 WebFrame* web_frame = GetMainFrame(); |
| 917 // A cancellation occurred. | 917 // A cancellation occurred. |
| 918 view_->didFailProvisionalLoad(web_frame, error); | 918 view_->didFailProvisionalLoad(web_frame, error); |
| 919 // Frame should stay in view-source mode. | 919 // Frame should stay in view-source mode. |
| 920 EXPECT_TRUE(web_frame->isViewSourceModeEnabled()); | 920 EXPECT_TRUE(web_frame->isViewSourceModeEnabled()); |
| 921 } | 921 } |
| OLD | NEW |