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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1572703002: Use the screen info's scale factor to scale the drag image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 1022
1023 FixedLayoutTestWebViewClient client; 1023 FixedLayoutTestWebViewClient client;
1024 client.m_screenInfo.deviceScaleFactor = 2; 1024 client.m_screenInfo.deviceScaleFactor = 2;
1025 1025
1026 FrameTestHelpers::WebViewHelper webViewHelper(this); 1026 FrameTestHelpers::WebViewHelper webViewHelper(this);
1027 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, 0, &client, enableViewportSettings); 1027 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, 0, &client, enableViewportSettings);
1028 1028
1029 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight)); 1029 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight));
1030 webViewHelper.webView()->updateAllLifecyclePhases(); 1030 webViewHelper.webView()->updateAllLifecyclePhases();
1031 1031
1032 EXPECT_EQ(2, webViewHelper.webView()->deviceScaleFactor()); 1032 EXPECT_EQ(2, webViewHelper.webViewImpl()->page()->deviceScaleFactor());
1033 1033
1034 // Device scale factor should be independent of page scale. 1034 // Device scale factor should be independent of page scale.
1035 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2); 1035 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2);
1036 webViewHelper.webView()->setPageScaleFactor(0.5); 1036 webViewHelper.webView()->setPageScaleFactor(0.5);
1037 webViewHelper.webView()->updateAllLifecyclePhases(); 1037 webViewHelper.webView()->updateAllLifecyclePhases();
1038 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); 1038 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor());
1039 1039
1040 // Force the layout to happen before leaving the test. 1040 // Force the layout to happen before leaving the test.
1041 webViewHelper.webView()->mainFrame()->contentAsText(1024).utf8(); 1041 webViewHelper.webView()->mainFrame()->contentAsText(1024).utf8();
1042 } 1042 }
(...skipping 7310 matching lines...) Expand 10 before | Expand all | Expand 10 after
8353 8353
8354 TEST_F(WebFrameTest, CallbackOrdering) 8354 TEST_F(WebFrameTest, CallbackOrdering)
8355 { 8355 {
8356 registerMockedHttpURLLoad("foo.html"); 8356 registerMockedHttpURLLoad("foo.html");
8357 FrameTestHelpers::WebViewHelper webViewHelper; 8357 FrameTestHelpers::WebViewHelper webViewHelper;
8358 CallbackOrderingWebFrameClient client; 8358 CallbackOrderingWebFrameClient client;
8359 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client); 8359 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client);
8360 } 8360 }
8361 8361
8362 } // namespace blink 8362 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698