Convert manual test added in http://trac.webkit.org/changeset/70321 to an automated...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 16:01:47 +0000 (16:01 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 16:01:47 +0000 (16:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74729
<rdar://problem/22550195>

Reviewed by Jon Honeycutt.

.:

* ManualTests/compositing/resources/composited-subframe.html: Removed.
* ManualTests/compositing/show-composited-iframe-on-back-button.html: Removed.

LayoutTests:

* compositing/resources/composited-subframe.html: Added.
* compositing/resources/show-composited-iframe-on-back-button.css: Added.
(.container):
(.box):
* compositing/show-composited-iframe-on-back-button-expected.html: Added.
* compositing/show-composited-iframe-on-back-button.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
LayoutTests/ChangeLog
LayoutTests/compositing/resources/composited-subframe.html [new file with mode: 0644]
LayoutTests/compositing/resources/show-composited-iframe-on-back-button.css [new file with mode: 0644]
LayoutTests/compositing/show-composited-iframe-on-back-button-expected.html [new file with mode: 0644]
LayoutTests/compositing/show-composited-iframe-on-back-button.html [new file with mode: 0644]
ManualTests/compositing/resources/composited-subframe.html [deleted file]
ManualTests/compositing/show-composited-iframe-on-back-button.html [deleted file]

index 8e71745..1ca358e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-09-08  Daniel Bates  <dabates@apple.com>
+
+        Convert manual test added in http://trac.webkit.org/changeset/70321 to an automated test
+        https://bugs.webkit.org/show_bug.cgi?id=74729
+        <rdar://problem/22550195>
+
+        Reviewed by Jon Honeycutt.
+
+        * ManualTests/compositing/resources/composited-subframe.html: Removed.
+        * ManualTests/compositing/show-composited-iframe-on-back-button.html: Removed.
+
 2015-09-06  Andy Estes  <aestes@apple.com>
 
         WebKit.xcworkspace should be be able to build iOS platforms
index f1b0305..5345ec5 100644 (file)
@@ -1,3 +1,18 @@
+2015-09-08  Daniel Bates  <dabates@apple.com>
+
+        Convert manual test added in http://trac.webkit.org/changeset/70321 to an automated test
+        https://bugs.webkit.org/show_bug.cgi?id=74729
+        <rdar://problem/22550195>
+
+        Reviewed by Jon Honeycutt.
+
+        * compositing/resources/composited-subframe.html: Added.
+        * compositing/resources/show-composited-iframe-on-back-button.css: Added.
+        (.container):
+        (.box):
+        * compositing/show-composited-iframe-on-back-button-expected.html: Added.
+        * compositing/show-composited-iframe-on-back-button.html: Added.
+
 2015-09-08  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
         [GTK] Unreviewed GTK gardening.
diff --git a/LayoutTests/compositing/resources/composited-subframe.html b/LayoutTests/compositing/resources/composited-subframe.html
new file mode 100644 (file)
index 0000000..69486b4
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="show-composited-iframe-on-back-button.css">
+</head>
+<body style="margin: 0">
+<div class="box"></div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/resources/show-composited-iframe-on-back-button.css b/LayoutTests/compositing/resources/show-composited-iframe-on-back-button.css
new file mode 100644 (file)
index 0000000..7d7aeaa
--- /dev/null
@@ -0,0 +1,13 @@
+.container {
+    height: 200px;
+    width: 200px;
+    border: 1px solid black;
+}
+
+.box {
+    height: 200px;
+    width: 200px;
+    background-color: blue;
+    -webkit-transform: translateZ(0);
+    overflow: hidden;
+}
diff --git a/LayoutTests/compositing/show-composited-iframe-on-back-button-expected.html b/LayoutTests/compositing/show-composited-iframe-on-back-button-expected.html
new file mode 100644 (file)
index 0000000..f21a306
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Show composited iframe contents when navigating back to page</title>
+<link rel="stylesheet" href="resources/show-composited-iframe-on-back-button.css">
+</head>
+<body>
+<p>This page has a composited iframe. When navigating to a new page and then back to this one, the iframe contents should show up.</p>
+<p>To run this test manually, perform the following:</p>
+<ol>
+    <li>Click <a href="http://apple.com">here</a>.</li>
+    <li>Click the back button in the browser.</li>
+</ol>
+<p>This test PASSED if a blue box is visible below. Otherwise, it FAILED.</p>
+<div class="container"><div class="box"></div></div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/show-composited-iframe-on-back-button.html b/LayoutTests/compositing/show-composited-iframe-on-back-button.html
new file mode 100644 (file)
index 0000000..65a8b10
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Show composited iframe contents when navigating back to page</title>
+<link rel="stylesheet" href="resources/show-composited-iframe-on-back-button.css">
+<script>
+function handleOnPageShow(pageTransitionEvent)
+{
+    console.assert(window.testRunner);
+    if (pageTransitionEvent.persisted)
+        return;
+
+    // First time the page has been loaded.
+    testRunner.queueLoad("about:blank");
+    testRunner.queueBackNavigation(1);
+}
+
+if (window.testRunner) {
+    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+
+    window.onpageshow = handleOnPageShow;
+}
+</script>
+</head>
+<body>
+<p>This page has a composited iframe. When navigating to a new page and then back to this one, the iframe contents should show up.</p>
+<p>To run this test manually, perform the following:</p>
+<ol>
+    <li>Click <a href="http://apple.com">here</a>.</li>
+    <li>Click the back button in the browser.</li>
+</ol>
+<p>This test PASSED if a blue box is visible below. Otherwise, it FAILED.</p>
+<iframe class="container" scrolling="no" src="resources/composited-subframe.html"></iframe>
+</body>
+</html>
diff --git a/ManualTests/compositing/resources/composited-subframe.html b/ManualTests/compositing/resources/composited-subframe.html
deleted file mode 100644 (file)
index 4a4f53e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-  <style type="text/css" media="screen">
-    body { background-color:silver }
-    
-    .box {
-        height: 200px;
-        width: 200px;
-        margin: 10px;
-        padding: 5px;
-        background-color: blue;
-        -webkit-transform: translateZ(0);
-        overflow:hidden;
-    }
-    .box:hover {
-        -webkit-transform: none;
-    }
-  </style>
-</head>
-<body>
-
-    <div id="iframe-content" class="box">
-    </div>
-
-</body>
-</html>
diff --git a/ManualTests/compositing/show-composited-iframe-on-back-button.html b/ManualTests/compositing/show-composited-iframe-on-back-button.html
deleted file mode 100644 (file)
index fff8888..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-    <!--
-        This content was originally intended as a layout test, but the sequencing performed by 
-        queueBackNavigation/queueForwardNavigation differs somehow from what occurs when hitting 
-        the back and forward buttons, so the error does not occur. I've left all the LayoutTestController 
-        logic in the test in case this is fixed in the future.
-    -->
-    
-    <title>Show composited iframe contents when navigating back to page</title>
-    <style type="text/css" media="screen">
-        #box {
-            background-color: red;
-            width: 100px;
-            height: 100px;
-            -webkit-transform: translateZ(0);
-        }
-        iframe {
-            margin: 20px;
-            height: 250px;
-            width: 250px;
-            border: 1px solid black;
-        }
-    
-        .composited {
-            -webkit-transform: translateZ(0);
-        }
-    
-    </style>
-    <script type="text/javascript" charset="utf-8">
-        var dumpLayerTree = function()
-        {
-            if (window.layoutTestController) {
-                document.getElementById('layers').innerHTML += "Layer Tree after\n\n"+layoutTestController.layerTreeAsText()+"\n\n";
-            }
-        }
-        
-        if (window.layoutTestController) {
-            layoutTestController.dumpAsText();
-        }
-        
-        function onPageShow(evt)
-        {
-            if (!evt.persisted && window.layoutTestController) {
-                // this is the first time the page has been loaded, then setup the
-                // to-be-tested scenario.
-                document.getElementById('layers').innerHTML = "Layer Tree before\n\n"+layoutTestController.layerTreeAsText()+"\n\n";
-                layoutTestController.queueLoad("resources/subframe.html");
-                layoutTestController.queueBackNavigation(1);
-                layoutTestController.queueForwardNavigation(1);
-                layoutTestController.queueBackNavigation(1);
-                layoutTestController.queueNonLoadingScript("dumpLayerTree()");
-            }
-        }
-
-        window.onpageshow = onPageShow;
-    </script>
-</head>
-<body>
-<p>
-    This page has a composited iframe. When navigating to a new page and then back to this one, the iframe contents should show up.
-</p>
-    Click on the following URL and then click back. When navigating back to this page, the blue box inside the black rectangle
-    should show up.
-</p>
-<pre>
-              <a href="http://apple.com">http://apple.com</a>
-</pre>
-    <div id=box></div>
-    <iframe id="iframe" scrolling="no" src="resources/composited-subframe.html"></iframe>
-<br>
-<pre id="layers"></pre>
-</body>
-</html>