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

Side by Side Diff: components/printing/test/print_web_view_helper_browsertest.cc

Issue 2199523002: Convert WebRange to be a simple pair of numbers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot the exports. Created 4 years, 4 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/printing/renderer/print_web_view_helper.h" 5 #include "components/printing/renderer/print_web_view_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 VerifyPreviewPageCount(3); 890 VerifyPreviewPageCount(3);
891 VerifyPrintPreviewCancelled(false); 891 VerifyPrintPreviewCancelled(false);
892 VerifyPrintPreviewFailed(false); 892 VerifyPrintPreviewFailed(false);
893 VerifyPrintPreviewGenerated(true); 893 VerifyPrintPreviewGenerated(true);
894 VerifyPagesPrinted(false); 894 VerifyPagesPrinted(false);
895 } 895 }
896 896
897 // Test to verify that preview generated only for one page. 897 // Test to verify that preview generated only for one page.
898 TEST_F(MAYBE_PrintWebViewHelperPreviewTest, OnPrintPreviewForSelectedText) { 898 TEST_F(MAYBE_PrintWebViewHelperPreviewTest, OnPrintPreviewForSelectedText) {
899 LoadHTML(kMultipageHTML); 899 LoadHTML(kMultipageHTML);
900 GetMainFrame()->selectRange( 900 GetMainFrame()->selectRange(blink::WebRange(1, 3));
901 blink::WebRange::fromDocumentRange(GetMainFrame(), 1, 3));
902 901
903 // Fill in some dummy values. 902 // Fill in some dummy values.
904 base::DictionaryValue dict; 903 base::DictionaryValue dict;
905 CreatePrintSettingsDictionary(&dict); 904 CreatePrintSettingsDictionary(&dict);
906 dict.SetBoolean(kSettingShouldPrintSelectionOnly, true); 905 dict.SetBoolean(kSettingShouldPrintSelectionOnly, true);
907 906
908 OnPrintPreview(dict); 907 OnPrintPreview(dict);
909 908
910 VerifyPreviewPageCount(1); 909 VerifyPreviewPageCount(1);
911 VerifyPrintPreviewCancelled(false); 910 VerifyPrintPreviewCancelled(false);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 1053
1055 VerifyPrintFailed(true); 1054 VerifyPrintFailed(true);
1056 VerifyPagesPrinted(false); 1055 VerifyPagesPrinted(false);
1057 } 1056 }
1058 #endif // defined(ENABLE_BASIC_PRINTING) 1057 #endif // defined(ENABLE_BASIC_PRINTING)
1059 #endif // defined(ENABLE_PRINT_PREVIEW) 1058 #endif // defined(ENABLE_PRINT_PREVIEW)
1060 1059
1061 #endif // !defined(OS_CHROMEOS) 1060 #endif // !defined(OS_CHROMEOS)
1062 1061
1063 } // namespace printing 1062 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698