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

Side by Side Diff: Tools/TestWebKitAPI/Tests/mac/devicePixelRatio.html

Issue 13602008: Remove non-chromium code from TestWebKitAPI (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 #detector { width: 5px; }
4 @media (-webkit-device-pixel-ratio:1) { #detector { width: 10px; } }
5 @media (-webkit-device-pixel-ratio:3) { #detector { width: 30px; } }
6 @media (-webkit-device-pixel-ratio:4) { #detector { width: 40px; } }
7 </style>
8 <script>
9 function devicePixelRatioFromStyle() {
10 var width = getComputedStyle(document.getElementById("detector")).width;
11 switch (width) {
12 case "10px":
13 return 1;
14 case "30px":
15 return 3;
16 case "40px":
17 return 4;
18 default:
19 return "unknown width: " + width;
20 }
21 }
22 </script>
23 <div id="detector"></div>
OLDNEW
« no previous file with comments | « Tools/TestWebKitAPI/Tests/mac/attributedStringCustomFont.html ('k') | Tools/TestWebKitAPI/Tests/mac/verboseMarkup.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698