Index: LayoutTests/css3/device-adapt/viewport-insert-rule-before.html |
diff --git a/LayoutTests/css3/device-adapt/viewport-insert-rule-before.html b/LayoutTests/css3/device-adapt/viewport-insert-rule-before.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0f04a75a9a76687b9b9a6b50fc75e903f0534257 |
--- /dev/null |
+++ b/LayoutTests/css3/device-adapt/viewport-insert-rule-before.html |
@@ -0,0 +1,22 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<title>Inserting an @viewport rule before an existing one (CSSOM)</title> |
+<style> |
+@viewport { |
+ width: 500px; |
+} |
+</style> |
+<script> |
+ function test() { |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ document.styleSheets[0].insertRule("@viewport {width: 1000px}", 0); |
+ document.body.offsetWidth; // Trigger style resolving |
+ alert(internals.configurationForViewport(document, 1, 320, 480, 320, 352)); |
+ } |
+ } |
+</script> |
+</head> |
+<body onload="test()"></body> |
+</html> |