OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></s
cript> | 3 <script src="../../http/tests/inspector-protocol/resources/inspector-protocol-te
st.js"></script> |
4 <script type="text/javascript"> | 4 <script type="text/javascript"> |
5 | 5 |
6 function getCurrentSrc() | 6 function getCurrentSrc() |
7 { | 7 { |
8 return document.getElementById("image-test").currentSrc; | 8 return document.getElementById("image-test").currentSrc; |
9 } | 9 } |
10 | 10 |
11 function test() | 11 function test() |
12 { | 12 { |
13 function setScaleFactor(value) | 13 function setScaleFactor(value) |
(...skipping 10 matching lines...) Expand all Loading... |
24 | 24 |
25 function clearScaleFactor(value) | 25 function clearScaleFactor(value) |
26 { | 26 { |
27 InspectorTest.log("Clear deviceScaleFactor"); | 27 InspectorTest.log("Clear deviceScaleFactor"); |
28 return InspectorTest.sendCommandPromise("Emulation.clearDeviceMetricsOve
rride", {}); | 28 return InspectorTest.sendCommandPromise("Emulation.clearDeviceMetricsOve
rride", {}); |
29 } | 29 } |
30 | 30 |
31 function reloadPage() | 31 function reloadPage() |
32 { | 32 { |
33 InspectorTest.log("Reloading Page"); | 33 InspectorTest.log("Reloading Page"); |
34 return new Promise(success => InspectorTest.reloadProtocolTest(false, su
ccess)); | 34 return new Promise(success => InspectorTest.reloaddpTest(false, success)
); |
35 } | 35 } |
36 | 36 |
37 function getSrcsetImage() | 37 function getSrcsetImage() |
38 { | 38 { |
39 var runInPage = InspectorTest.evaluateInInspectedPage; | 39 var runInPage = InspectorTest.evaluateInInspectedPage; |
40 return new Promise(success => runInPage("getCurrentSrc()", result => suc
cess(result.result.result.value))); | 40 return new Promise(success => runInPage("getCurrentSrc()", result => suc
cess(result.result.result.value))); |
41 } | 41 } |
42 | 42 |
43 function dumpImageSrc() | 43 function dumpImageSrc() |
44 { | 44 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 </script> | 81 </script> |
82 </head> | 82 </head> |
83 <body onload="runTest()"> | 83 <body onload="runTest()"> |
84 <p>Test that srcset does not use wrong image when override scalefactor and then
disabled.</p> | 84 <p>Test that srcset does not use wrong image when override scalefactor and then
disabled.</p> |
85 <img id="image-test" src="../resources/square.png" srcset="../resources/square.p
ng 1x, ../resources/square200.png 2x" /> | 85 <img id="image-test" src="../resources/square.png" srcset="../resources/square.p
ng 1x, ../resources/square200.png 2x" /> |
86 </body> | 86 </body> |
87 </html> | 87 </html> |
OLD | NEW |