Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
|
Xianzhu
2016/09/30 03:36:14
Normally we omit <html>, <head>, <body> in layout
malaykeshav
2016/09/30 18:23:39
Done
| |
| 4 <script> | |
| 5 window.enablePixelTesting = true; | |
|
Xianzhu
2016/09/30 03:36:14
Please remove the above line. It's no use here.
Y
malaykeshav
2016/09/30 18:23:39
Done
| |
| 6 function finishTest() { | |
| 7 setTimeout(function() {testRunner.notifyDone();}, 0); | |
|
Xianzhu
2016/09/30 03:36:14
Is the setTimeout necessary?
malaykeshav
2016/09/30 18:23:39
Removed.
| |
| 8 } | |
| 9 | |
| 10 function scaleDown() { | |
| 11 if (window.testRunner) { | |
| 12 testRunner.setBackingScaleFactor(1, finishTest); | |
| 13 } | |
| 14 } | |
| 15 function startTest() { | |
| 16 testRunner.waitUntilDone(); | |
| 17 if (window.testRunner) { | |
|
Xianzhu
2016/09/30 03:36:14
Line 16 should be also protected by if (window.tes
malaykeshav
2016/09/30 18:23:39
Done
| |
| 18 testRunner.setBackingScaleFactor(3, scaleDown); | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 window.addEventListener("load", startTest, false); | |
|
Xianzhu
2016/09/30 03:36:14
You can use shorter form:
onload = startTest;
or
malaykeshav
2016/09/30 18:23:39
Done
| |
| 23 </script> | |
| 24 </head> | |
| 25 <body> | |
| 26 <div id="div" style="width:200px; height:120px; overflow:auto"> | |
| 27 <br>This should be a scrollable text box with horizontal and vertical scroll. | |
| 28 <div style="width:400px; height: 200px; background-color:red"></div> | |
|
Xianzhu
2016/09/30 03:36:14
Remove "background-color: red". Normally we use re
malaykeshav
2016/09/30 18:23:39
Done
| |
| 29 </div> | |
| 30 </body> | |
| 31 </html> | |
|
Xianzhu
2016/09/30 03:36:14
We prefer reference tests to pixel tests because t
malaykeshav
2016/09/30 18:23:39
The two files will not be _exactly_ the same due t
Xianzhu
2016/09/30 18:36:20
This looks weird to me. The final scale is 1 which
| |
| OLD | NEW |