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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-invalid-page-scale-factor.html

Issue 2350163002: Prevent LayoutTest setting -1 page scale factor. (Closed)
Patch Set: Rewrite the test. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-invalid-page-scale-factor.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-invalid-page-scale-factor.html b/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-invalid-page-scale-factor.html
new file mode 100644
index 0000000000000000000000000000000000000000..66271f76a453ac9b4344470d66ceb3007abb3ff1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-invalid-page-scale-factor.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body {
+ height: 2000px;
+ width: 2000px;
+ }
+ </style>
+ <script>
+ function run()
+ {
+ window.internals.setPageScaleFactor(-1);
+ if (window.testRunner) {
+ testRunner.capturePixelsAsyncThen(function() {});
+ testRunner.waitUntilDone();
+ window.setTimeout(notifyDone, 1200);
ajuma 2016/09/19 18:58:57 Using setTimeout can make tests flaky, so using re
+ }
+ }
+ function notifyDone()
+ {
+ testRunner.notifyDone();
+ }
+ </script>
+ </head>
+ <body onload="run()">
+ <div id="description">
+ The test passes if the page does not crash.
+ </div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698