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

Side by Side Diff: LayoutTests/fast/viewport/viewport-legacy-xhtmlmp-misplaced-doctype.html

Issue 23101004: Make configurationForViewport match production code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed configurationForViewport to viewportAsText Created 7 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
OLDNEW
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <head> 2 <head>
3 <!-- 3 <!--
4 Related spec: http://www.w3.org/TR/css-device-adapt/ 4 Related spec: http://www.w3.org/TR/css-device-adapt/
5 5
6 XHTML-MP is used for mobile documents which are assumed to be designed for 6 XHTML-MP is used for mobile documents which are assumed to be designed for
7 handheld devices, hence using the viewport size as the initial containing 7 handheld devices, hence using the viewport size as the initial containing
8 block size, so using XHTML-MP will give the same result as a viewport 8 block size, so using XHTML-MP will give the same result as a viewport
9 meta tag with the following parameters: 9 meta tag with the following parameters:
10 10
11 width=device-width, height=device-height, initial-scale=1 11 width=device-width, height=device-height, initial-scale=1
12 12
13 However XHTML-MP is a legacy way of setting the viewport, so any viewport 13 However XHTML-MP is a legacy way of setting the viewport, so any viewport
14 related meta tag takes precedence. 14 related meta tag takes precedence.
15 15
16 This test if a missplaced XHTML-MP doctype entry doesn't change the already 16 This test if a missplaced XHTML-MP doctype entry doesn't change the already
17 set viewport settings. 17 set viewport settings.
18 18
19 --> 19 -->
20 <meta name="viewport" content="width=640" /> 20 <meta name="viewport" content="width=640" />
21 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wa pforum.org/DTD/xhtml-mobile10.dtd"> 21 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wa pforum.org/DTD/xhtml-mobile10.dtd">
22 <title>Default viewport value changed by XHTML-MP and overwritten by viewpor t meta tag</title> 22 <title>Default viewport value changed by XHTML-MP and overwritten by viewpor t meta tag</title>
23 <script> 23 <script>
24 function test() { 24 function test() {
25 if (window.testRunner) { 25 if (window.testRunner) {
26 testRunner.dumpAsText(); 26 testRunner.dumpAsText();
27 alert(internals.configurationForViewport(document, 1, 320, 480, 320, 352)); 27 alert(internals.viewportAsText(document, 1, 320, 352));
28 } 28 }
29 } 29 }
30 </script> 30 </script>
31 </head> 31 </head>
32 <body onload="test();" /> 32 <body onload="test();" />
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698