Convert current MHTML tests into reftests
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 17:08:08 +0000 (17:08 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 17:08:08 +0000 (17:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116443

Reviewed by Andreas Kling.

Convert the current set of MHTML tests into reference tests. Reference files are copied from the *_original files
where available (with the *_original files removed) or from the source markup and code that's stored in the archive.
Both the archives and the reference files are adjusted to now dump pixel output instead of text.

* mhtml/check_domain-expected.html: Added.
* mhtml/check_domain-expected.txt: Removed.
* mhtml/check_domain.mht:
* mhtml/frame_4.html_original: Removed.
* mhtml/multi_frames.html_original: Removed.
* mhtml/multi_frames_binary-expected.html: Added.
* mhtml/multi_frames_binary-expected.txt: Removed.
* mhtml/multi_frames_binary.mht:
* mhtml/multi_frames_ie-expected.html: Added.
* mhtml/multi_frames_ie-expected.txt: Removed.
* mhtml/multi_frames_ie.mht:
* mhtml/multi_frames_unmht-expected.html: Added.
* mhtml/multi_frames_unmht-expected.txt: Removed.
* mhtml/multi_frames_unmht.mht:
* mhtml/page_with_css_and_js_ie-expected.html: Copied from LayoutTests/mhtml/page_with_css_and_js.html_original.
* mhtml/page_with_css_and_js_ie-expected.txt: Removed.
* mhtml/page_with_css_and_js_ie.mht:
* mhtml/page_with_css_and_js_unmht-expected.html: Renamed from LayoutTests/mhtml/page_with_css_and_js.html_original.
* mhtml/page_with_css_and_js_unmht-expected.txt: Removed.
* mhtml/page_with_css_and_js_unmht.mht:
* mhtml/page_with_image.html_original: Removed.
* mhtml/page_with_image_ie-expected.html: Added.
* mhtml/page_with_image_ie-expected.txt: Removed.
* mhtml/page_with_image_ie.mht:
* mhtml/page_with_image_unmht-expected.html: Added.
* mhtml/page_with_image_unmht-expected.txt: Removed.
* mhtml/page_with_image_unmht.mht:
* mhtml/resources/frame_0.html: Renamed from LayoutTests/mhtml/frame_0.html_original.
* mhtml/resources/frame_1.html: Renamed from LayoutTests/mhtml/frame_1.html_original.
* mhtml/resources/frame_2.html: Renamed from LayoutTests/mhtml/frame_2.html_original.
* mhtml/resources/frame_4.html: Added.
* mhtml/resources/hide_image.css: Added.
(#secondDiv):
* mhtml/resources/remove_image_script.js: Added.
(onLoad):
* mhtml/resources/style.css: Copied from LayoutTests/mhtml/shared_buffer_bug.mht.
(h1):
* mhtml/shared_buffer_bug-expected.html: Added.
* mhtml/shared_buffer_bug-expected.txt: Removed.
* mhtml/shared_buffer_bug.mht:
* mhtml/simple_page_ie-expected.html: Copied from LayoutTests/mhtml/simple_page.html_original.
* mhtml/simple_page_ie-expected.txt: Removed.
* mhtml/simple_page_ie.mht:
* mhtml/simple_page_unmht-expected.html: Renamed from LayoutTests/mhtml/simple_page.html_original.
* mhtml/simple_page_unmht-expected.txt: Removed.
* mhtml/simple_page_unmht.mht:

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

44 files changed:
LayoutTests/ChangeLog
LayoutTests/mhtml/check_domain-expected.html [new file with mode: 0644]
LayoutTests/mhtml/check_domain-expected.txt [deleted file]
LayoutTests/mhtml/check_domain.mht
LayoutTests/mhtml/frame_4.html_original [deleted file]
LayoutTests/mhtml/multi_frames.html_original [deleted file]
LayoutTests/mhtml/multi_frames_binary-expected.html [new file with mode: 0644]
LayoutTests/mhtml/multi_frames_binary-expected.txt [deleted file]
LayoutTests/mhtml/multi_frames_binary.mht
LayoutTests/mhtml/multi_frames_ie-expected.html [new file with mode: 0644]
LayoutTests/mhtml/multi_frames_ie-expected.txt [deleted file]
LayoutTests/mhtml/multi_frames_ie.mht [changed mode: 0755->0644]
LayoutTests/mhtml/multi_frames_unmht-expected.html [new file with mode: 0644]
LayoutTests/mhtml/multi_frames_unmht-expected.txt [deleted file]
LayoutTests/mhtml/multi_frames_unmht.mht [changed mode: 0755->0644]
LayoutTests/mhtml/page_with_css_and_js_ie-expected.html [moved from LayoutTests/mhtml/page_with_css_and_js.html_original with 86% similarity, mode: 0644]
LayoutTests/mhtml/page_with_css_and_js_ie-expected.txt [deleted file]
LayoutTests/mhtml/page_with_css_and_js_ie.mht [changed mode: 0755->0644]
LayoutTests/mhtml/page_with_css_and_js_unmht-expected.html [new file with mode: 0644]
LayoutTests/mhtml/page_with_css_and_js_unmht-expected.txt [deleted file]
LayoutTests/mhtml/page_with_css_and_js_unmht.mht [changed mode: 0755->0644]
LayoutTests/mhtml/page_with_image.html_original [deleted file]
LayoutTests/mhtml/page_with_image_ie-expected.html [new file with mode: 0644]
LayoutTests/mhtml/page_with_image_ie-expected.txt [deleted file]
LayoutTests/mhtml/page_with_image_ie.mht [changed mode: 0755->0644]
LayoutTests/mhtml/page_with_image_unmht-expected.html [new file with mode: 0644]
LayoutTests/mhtml/page_with_image_unmht-expected.txt [deleted file]
LayoutTests/mhtml/page_with_image_unmht.mht [changed mode: 0755->0644]
LayoutTests/mhtml/resources/frame_0.html [moved from LayoutTests/mhtml/frame_0.html_original with 100% similarity]
LayoutTests/mhtml/resources/frame_1.html [moved from LayoutTests/mhtml/frame_1.html_original with 100% similarity]
LayoutTests/mhtml/resources/frame_2.html [moved from LayoutTests/mhtml/frame_2.html_original with 100% similarity]
LayoutTests/mhtml/resources/frame_4.html [new file with mode: 0644]
LayoutTests/mhtml/resources/hide_image.css [new file with mode: 0644]
LayoutTests/mhtml/resources/remove_image_script.js [new file with mode: 0644]
LayoutTests/mhtml/resources/style.css [new file with mode: 0644]
LayoutTests/mhtml/shared_buffer_bug-expected.html [new file with mode: 0644]
LayoutTests/mhtml/shared_buffer_bug-expected.txt [deleted file]
LayoutTests/mhtml/shared_buffer_bug.mht
LayoutTests/mhtml/simple_page_ie-expected.html [moved from LayoutTests/mhtml/simple_page.html_original with 69% similarity]
LayoutTests/mhtml/simple_page_ie-expected.txt [deleted file]
LayoutTests/mhtml/simple_page_ie.mht [changed mode: 0755->0644]
LayoutTests/mhtml/simple_page_unmht-expected.html [new file with mode: 0644]
LayoutTests/mhtml/simple_page_unmht-expected.txt [deleted file]
LayoutTests/mhtml/simple_page_unmht.mht [changed mode: 0755->0644]

index 3205350..9d44188 100644 (file)
@@ -1,3 +1,61 @@
+2014-02-08  Zan Dobersek  <zdobersek@igalia.com>
+
+        Convert current MHTML tests into reftests
+        https://bugs.webkit.org/show_bug.cgi?id=116443
+
+        Reviewed by Andreas Kling.
+
+        Convert the current set of MHTML tests into reference tests. Reference files are copied from the *_original files
+        where available (with the *_original files removed) or from the source markup and code that's stored in the archive.
+        Both the archives and the reference files are adjusted to now dump pixel output instead of text.
+
+        * mhtml/check_domain-expected.html: Added.
+        * mhtml/check_domain-expected.txt: Removed.
+        * mhtml/check_domain.mht:
+        * mhtml/frame_4.html_original: Removed.
+        * mhtml/multi_frames.html_original: Removed.
+        * mhtml/multi_frames_binary-expected.html: Added.
+        * mhtml/multi_frames_binary-expected.txt: Removed.
+        * mhtml/multi_frames_binary.mht:
+        * mhtml/multi_frames_ie-expected.html: Added.
+        * mhtml/multi_frames_ie-expected.txt: Removed.
+        * mhtml/multi_frames_ie.mht:
+        * mhtml/multi_frames_unmht-expected.html: Added.
+        * mhtml/multi_frames_unmht-expected.txt: Removed.
+        * mhtml/multi_frames_unmht.mht:
+        * mhtml/page_with_css_and_js_ie-expected.html: Copied from LayoutTests/mhtml/page_with_css_and_js.html_original.
+        * mhtml/page_with_css_and_js_ie-expected.txt: Removed.
+        * mhtml/page_with_css_and_js_ie.mht:
+        * mhtml/page_with_css_and_js_unmht-expected.html: Renamed from LayoutTests/mhtml/page_with_css_and_js.html_original.
+        * mhtml/page_with_css_and_js_unmht-expected.txt: Removed.
+        * mhtml/page_with_css_and_js_unmht.mht:
+        * mhtml/page_with_image.html_original: Removed.
+        * mhtml/page_with_image_ie-expected.html: Added.
+        * mhtml/page_with_image_ie-expected.txt: Removed.
+        * mhtml/page_with_image_ie.mht:
+        * mhtml/page_with_image_unmht-expected.html: Added.
+        * mhtml/page_with_image_unmht-expected.txt: Removed.
+        * mhtml/page_with_image_unmht.mht:
+        * mhtml/resources/frame_0.html: Renamed from LayoutTests/mhtml/frame_0.html_original.
+        * mhtml/resources/frame_1.html: Renamed from LayoutTests/mhtml/frame_1.html_original.
+        * mhtml/resources/frame_2.html: Renamed from LayoutTests/mhtml/frame_2.html_original.
+        * mhtml/resources/frame_4.html: Added.
+        * mhtml/resources/hide_image.css: Added.
+        (#secondDiv):
+        * mhtml/resources/remove_image_script.js: Added.
+        (onLoad):
+        * mhtml/resources/style.css: Copied from LayoutTests/mhtml/shared_buffer_bug.mht.
+        (h1):
+        * mhtml/shared_buffer_bug-expected.html: Added.
+        * mhtml/shared_buffer_bug-expected.txt: Removed.
+        * mhtml/shared_buffer_bug.mht:
+        * mhtml/simple_page_ie-expected.html: Copied from LayoutTests/mhtml/simple_page.html_original.
+        * mhtml/simple_page_ie-expected.txt: Removed.
+        * mhtml/simple_page_ie.mht:
+        * mhtml/simple_page_unmht-expected.html: Renamed from LayoutTests/mhtml/simple_page.html_original.
+        * mhtml/simple_page_unmht-expected.txt: Removed.
+        * mhtml/simple_page_unmht.mht:
+
 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
 
         Remove isInitialState flag from Page::setViewState
diff --git a/LayoutTests/mhtml/check_domain-expected.html b/LayoutTests/mhtml/check_domain-expected.html
new file mode 100644 (file)
index 0000000..df5ca03
--- /dev/null
@@ -0,0 +1,28 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+
+<title>A simple page</title>
+<script>
+if (window.testRunner)
+  testRunner.waitUntilDone();
+
+window.onload = function() {
+  var span=document.createElement("span");
+  if (window.location != 'http://localhost/simple_page.html' &&
+      document.domain != 'localhost') {
+     span.innerHTML = "PASS";
+  } else {
+     span.innerHTML = "FAIL window.location=" + window.location +
+         " document.domain=" + document.domain;
+  }
+
+  document.getElementById('locDiv').appendChild(span);
+  testRunner.notifyDone();
+}
+
+</script>
+<base href=3D"http://localhost/"></base></head><body>
+<h1>This is a very simple page</h1>
+Very <b>basic</b> page.
+<div id='locDiv'></div>
+</body></html>
diff --git a/LayoutTests/mhtml/check_domain-expected.txt b/LayoutTests/mhtml/check_domain-expected.txt
deleted file mode 100644 (file)
index 0345374..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a very simple page
-
-Very basic page.
-PASS
index 07282c0..d4fecbb 100644 (file)
@@ -17,10 +17,8 @@ Content-Location: http://localhost/simple_page.html
 \r
 <title>A simple page</title>\r
 <script>\r
-if (window.testRunner) {\r
-  testRunner.dumpAsText();\r
+if (window.testRunner)\r
   testRunner.waitUntilDone();\r
-}\r
 \r
 window.onload = function() {\r
   var span=3Ddocument.createElement("span");\r
diff --git a/LayoutTests/mhtml/frame_4.html_original b/LayoutTests/mhtml/frame_4.html_original
deleted file mode 100644 (file)
index 886908a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-
-</head><body>
-This is frame 4!<br>
-<img src="frame_4_files/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
-<div id="error">Failed to load image!</div>
-</body></html>
\ No newline at end of file
diff --git a/LayoutTests/mhtml/multi_frames.html_original b/LayoutTests/mhtml/multi_frames.html_original
deleted file mode 100644 (file)
index 8c8e01c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-
-
-<title>A page that contains multiple nested frames</title>
-<script>
-if (window.testRunner) {
-  testRunner.dumpAsText();
-  testRunner.dumpChildFramesAsText();
-}
-</script>
-</head><body>
-This page contains several frames.<br>
-<iframe src="multi_frames_files/frame_0.html"></iframe><br>
-<iframe src="multi_frames_files/frame_1.html"></iframe><br>
-<iframe src="multi_frames_files/frame_2.html"></iframe><br>
-And a red square:<br>
-<img src="frame_4_data/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
-<div id="error"></div>
-</body></html>
\ No newline at end of file
diff --git a/LayoutTests/mhtml/multi_frames_binary-expected.html b/LayoutTests/mhtml/multi_frames_binary-expected.html
new file mode 100644 (file)
index 0000000..491ccec
--- /dev/null
@@ -0,0 +1,14 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>A page that contains multiple nested frames</title>
+</head><body>
+This page contains several frames.<br>
+<iframe src="resources/frame_0.html"></iframe><br>
+<iframe src="resources/frame_1.html"></iframe><br>
+<iframe src="resources/frame_2.html"></iframe><br>
+And a red square:<br>
+<img src="resources/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/multi_frames_binary-expected.txt b/LayoutTests/mhtml/multi_frames_binary-expected.txt
deleted file mode 100644 (file)
index 09ba461..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-This page contains several frames.
-
-
-
-And a red square:
-
-
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-The first frame!
-
---------
-Frame: '<!--framePath //<!--frame1-->-->'
---------
-The second frame!
-
---------
-Frame: '<!--framePath //<!--frame2-->-->'
---------
-The third frame!
-This one contains yet another frame. What a twist!
-
-
---------
-Frame: '<!--framePath //<!--frame2-->/<!--frame0-->-->'
---------
-This is frame 4!
-
-
index 9043adb..e6378cc 100644 (file)
Binary files a/LayoutTests/mhtml/multi_frames_binary.mht and b/LayoutTests/mhtml/multi_frames_binary.mht differ
diff --git a/LayoutTests/mhtml/multi_frames_ie-expected.html b/LayoutTests/mhtml/multi_frames_ie-expected.html
new file mode 100644 (file)
index 0000000..491ccec
--- /dev/null
@@ -0,0 +1,14 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>A page that contains multiple nested frames</title>
+</head><body>
+This page contains several frames.<br>
+<iframe src="resources/frame_0.html"></iframe><br>
+<iframe src="resources/frame_1.html"></iframe><br>
+<iframe src="resources/frame_2.html"></iframe><br>
+And a red square:<br>
+<img src="resources/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/multi_frames_ie-expected.txt b/LayoutTests/mhtml/multi_frames_ie-expected.txt
deleted file mode 100644 (file)
index 09ba461..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-This page contains several frames.
-
-
-
-And a red square:
-
-
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-The first frame!
-
---------
-Frame: '<!--framePath //<!--frame1-->-->'
---------
-The second frame!
-
---------
-Frame: '<!--framePath //<!--frame2-->-->'
---------
-The third frame!
-This one contains yet another frame. What a twist!
-
-
---------
-Frame: '<!--framePath //<!--frame2-->/<!--frame0-->-->'
---------
-This is frame 4!
-
-
old mode 100755 (executable)
new mode 100644 (file)
index 4048720..c79639f
@@ -35,12 +35,6 @@ Content-Location: http://localhost/top_frame.html
 <HTML><HEAD><TITLE>A page that contains multiple nested frames</TITLE>\r
 <META content=3D"text/html; charset=3Dwindows-1252" =\r
 http-equiv=3DContent-Type>\r
-<SCRIPT>=0A=\r
-if (window.testRunner) {=0A=\r
-  testRunner.dumpAsText();=0A=\r
-  testRunner.dumpChildFramesAsText();=0A=\r
-}=0A=\r
-</SCRIPT>\r
 \r
 <META name=3DGENERATOR content=3D"MSHTML 9.00.8112.16421"></HEAD>\r
 <BODY>This page contains several frames.<BR><IFRAME=20\r
diff --git a/LayoutTests/mhtml/multi_frames_unmht-expected.html b/LayoutTests/mhtml/multi_frames_unmht-expected.html
new file mode 100644 (file)
index 0000000..491ccec
--- /dev/null
@@ -0,0 +1,14 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>A page that contains multiple nested frames</title>
+</head><body>
+This page contains several frames.<br>
+<iframe src="resources/frame_0.html"></iframe><br>
+<iframe src="resources/frame_1.html"></iframe><br>
+<iframe src="resources/frame_2.html"></iframe><br>
+And a red square:<br>
+<img src="resources/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/multi_frames_unmht-expected.txt b/LayoutTests/mhtml/multi_frames_unmht-expected.txt
deleted file mode 100644 (file)
index 09ba461..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-This page contains several frames.
-
-
-
-And a red square:
-
-
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-The first frame!
-
---------
-Frame: '<!--framePath //<!--frame1-->-->'
---------
-The second frame!
-
---------
-Frame: '<!--framePath //<!--frame2-->-->'
---------
-The third frame!
-This one contains yet another frame. What a twist!
-
-
---------
-Frame: '<!--framePath //<!--frame2-->/<!--frame0-->-->'
---------
-This is frame 4!
-
-
old mode 100755 (executable)
new mode 100644 (file)
index 1c88776..e11efc1
@@ -16,12 +16,6 @@ Content-Location: http://localhost/top_frame.html
 \r
 \r
 <title>A page that contains multiple nested frames</title>\r
-<script>\r
-if (window.testRunner) {\r
-  testRunner.dumpAsText();\r
-  testRunner.dumpChildFramesAsText();\r
-}\r
-</script>\r
 <base href=3D"http://localhost/"></base></head><body>\r
 This page contains several frames.<br>\r
 <iframe src=3D"http://localhost/frame_0.html"></iframe><br>\r
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from LayoutTests/mhtml/page_with_css_and_js.html_original
rename to LayoutTests/mhtml/page_with_css_and_js_ie-expected.html
index 1ed3de0..cc83131
@@ -4,6 +4,10 @@
   <link href="resources/hide_image.css" rel="stylesheet" type="text/css">\r
    \r
   <script type="text/javascript" src="resources/remove_image_script.js"></script>\r
+  <script>\r
+    if (window.testRunner)\r
+      testRunner.waitUntilDone();\r
+  </script>\r
 </head>\r
 \r
 <body onload="onLoad()">\r
diff --git a/LayoutTests/mhtml/page_with_css_and_js_ie-expected.txt b/LayoutTests/mhtml/page_with_css_and_js_ie-expected.txt
deleted file mode 100644 (file)
index e790698..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-This page tests that CSS and JavaScript resources are retrieved correctly for MHTML files.
-
-There should be only one red square below:
-
-
-
old mode 100755 (executable)
new mode 100644 (file)
index f69959b..ee22617
@@ -25,10 +25,8 @@ href=3D"http://localhost/resources/hide_image.css">
 src=3D"http://localhost/resources/remove_image_script.js"></SCRIPT>\r
 \r
 <SCRIPT>=0A=\r
-    if (window.testRunner) {=0A=\r
-      testRunner.dumpAsText();=0A=\r
+    if (window.testRunner)=0A=\r
       testRunner.waitUntilDone();=0A=\r
-    }=0A=\r
   </SCRIPT>\r
 \r
 <META name=3DGENERATOR content=3D"MSHTML 9.00.8112.16421"></HEAD>\r
diff --git a/LayoutTests/mhtml/page_with_css_and_js_unmht-expected.html b/LayoutTests/mhtml/page_with_css_and_js_unmht-expected.html
new file mode 100644 (file)
index 0000000..cc83131
--- /dev/null
@@ -0,0 +1,31 @@
+<html>\r
+\r
+<head>\r
+  <link href="resources/hide_image.css" rel="stylesheet" type="text/css">\r
+   \r
+  <script type="text/javascript" src="resources/remove_image_script.js"></script>\r
+  <script>\r
+    if (window.testRunner)\r
+      testRunner.waitUntilDone();\r
+  </script>\r
+</head>\r
+\r
+<body onload="onLoad()">\r
+This page tests that CSS and JavaScript resources are retrieved correctly for MHTML files.<br><br>\r
+There should be only one red square below:\r
+<div id="firstDiv">\r
+<img src="resources/red_square.png"><br><br>\r
+</div>\r
+<div id="secondDiv">\r
+The red square below should be hidden by way of CSS.<br>\r
+<img src="resources/red_square.png"><br><br>\r
+</div>\r
+<div id="thirdDiv">\r
+The red square below should be hidden by way of JavaScript.<br>\r
+<img src="resources/red_square.png"><br><br>\r
+</div>\r
+  \r
+</body>\r
+\r
+\r
+</html>\r
diff --git a/LayoutTests/mhtml/page_with_css_and_js_unmht-expected.txt b/LayoutTests/mhtml/page_with_css_and_js_unmht-expected.txt
deleted file mode 100644 (file)
index e790698..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-This page tests that CSS and JavaScript resources are retrieved correctly for MHTML files.
-
-There should be only one red square below:
-
-
-
old mode 100755 (executable)
new mode 100644 (file)
index 4487b72..1af3d14
@@ -21,10 +21,8 @@ ss"></link>
   <script src=3D"resources/remove_image_script.js" type=3D"text/javascript"=\r
 ></script>\r
   <script>\r
-    if (window.testRunner) {\r
-      testRunner.dumpAsText();\r
+    if (window.testRunner)\r
       testRunner.waitUntilDone();\r
-    }\r
   </script>\r
 <base href=3D"http://localhost/"></base></head><body onload=3D"onLoad()">\r
 This page tests that CSS and JavaScript resources are retrieved correctly=\r
diff --git a/LayoutTests/mhtml/page_with_image.html_original b/LayoutTests/mhtml/page_with_image.html_original
deleted file mode 100644 (file)
index 952869a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-
-
-<title>Page with square</title>
-<script>
-if (window.testRunner) {
-  testRunner.dumpAsText();
-}
-
-</script>
-</head><body>
-This is a red square:<br>
-<img src="page_with_image_files/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
-<div id="error"></div>
-</body></html>
\ No newline at end of file
diff --git a/LayoutTests/mhtml/page_with_image_ie-expected.html b/LayoutTests/mhtml/page_with_image_ie-expected.html
new file mode 100644 (file)
index 0000000..c2f1e22
--- /dev/null
@@ -0,0 +1,10 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>Page with square</title>
+</head><body>
+This is a red square:<br>
+<img src="resources/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/page_with_image_ie-expected.txt b/LayoutTests/mhtml/page_with_image_ie-expected.txt
deleted file mode 100644 (file)
index b28959b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a red square:
-
-
old mode 100755 (executable)
new mode 100644 (file)
index 96c0925..7dd1132
@@ -19,12 +19,6 @@ Content-Location: http://localhost/page_with_image.html
 <HTML><HEAD><TITLE>Page with square</TITLE>\r
 <META content=3D"text/html; charset=3Dwindows-1252" =\r
 http-equiv=3DContent-Type>\r
-<SCRIPT>=0A=\r
-if (window.testRunner) {=0A=\r
-  testRunner.dumpAsText();=0A=\r
-}=0A=\r
-=0A=\r
-</SCRIPT>\r
 \r
 <META name=3DGENERATOR content=3D"MSHTML 9.00.8112.16421"></HEAD>\r
 <BODY>This is a red square:<BR><IMG=20\r
diff --git a/LayoutTests/mhtml/page_with_image_unmht-expected.html b/LayoutTests/mhtml/page_with_image_unmht-expected.html
new file mode 100644 (file)
index 0000000..c2f1e22
--- /dev/null
@@ -0,0 +1,10 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>Page with square</title>
+</head><body>
+This is a red square:<br>
+<img src="resources/red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/page_with_image_unmht-expected.txt b/LayoutTests/mhtml/page_with_image_unmht-expected.txt
deleted file mode 100644 (file)
index b28959b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a red square:
-
-
old mode 100755 (executable)
new mode 100644 (file)
index 1601551..2378149
@@ -16,12 +16,6 @@ Content-Location: http://localhost/page_with_image.html
 \r
 \r
 <title>Page with square</title>\r
-<script>\r
-if (window.testRunner) {\r
-  testRunner.dumpAsText();\r
-}\r
-\r
-</script>\r
 <base href=3D"http://localhost/"></base></head><body>\r
 This is a red square:<br>\r
 <img onerror=3D"document.getElementById(&#x27;error&#x27;).innerHTML+=3D&#x=\r
diff --git a/LayoutTests/mhtml/resources/frame_4.html b/LayoutTests/mhtml/resources/frame_4.html
new file mode 100644 (file)
index 0000000..01e06e4
--- /dev/null
@@ -0,0 +1,8 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+</head><body>
+This is frame 4!<br>
+<img src="red_square.png" onerror="document.getElementById('error').innerHTML+='Failed to load image!'">
+<div id="error"></div>
+</body></html>
diff --git a/LayoutTests/mhtml/resources/hide_image.css b/LayoutTests/mhtml/resources/hide_image.css
new file mode 100644 (file)
index 0000000..c29961c
--- /dev/null
@@ -0,0 +1,2 @@
+#secondDiv { display: none; }
+
diff --git a/LayoutTests/mhtml/resources/remove_image_script.js b/LayoutTests/mhtml/resources/remove_image_script.js
new file mode 100644 (file)
index 0000000..51f7e7a
--- /dev/null
@@ -0,0 +1,7 @@
+
+function onLoad() {
+    divToRemove = document.getElementById("thirdDiv");
+    divToRemove.parentNode.removeChild(divToRemove);
+    if (window.testRunner)
+      testRunner.notifyDone();
+}
diff --git a/LayoutTests/mhtml/resources/style.css b/LayoutTests/mhtml/resources/style.css
new file mode 100644 (file)
index 0000000..f0a19a4
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+The point is to reach a size of n * 4096 bytes (with n > 1)
+followed by a blank line to trigger a bug in SharredBuffer.
+
+Let's go:
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+012345678901234567890123456789012345678901234567890123456789
+*/
+
+
+h1 { visibility: hidden; }
+
diff --git a/LayoutTests/mhtml/shared_buffer_bug-expected.html b/LayoutTests/mhtml/shared_buffer_bug-expected.html
new file mode 100644 (file)
index 0000000..b7bad31
--- /dev/null
@@ -0,0 +1,11 @@
+<html><head><meta charset="ISO-8859-1">
+<link rel="stylesheet" type="text/css" href="resources/style.css">
+</head>
+
+<body>
+  This is a test for a bug in SharedBuffer.
+  <h1>This text should not be shown</h1>
+
+
+
+</body></html>
diff --git a/LayoutTests/mhtml/shared_buffer_bug-expected.txt b/LayoutTests/mhtml/shared_buffer_bug-expected.txt
deleted file mode 100644 (file)
index ab049b6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a test for a bug in SharedBuffer.
-
index 7a5937c..dc5735c 100644 (file)
@@ -14,12 +14,6 @@ Content-Location: http://localhost/sharred_buffer_bug.html
 <html><head><meta charset=3D"ISO-8859-1">\r
 <link rel=3D"stylesheet" type=3D"text/css" href=3D"http://localhost/resourc=\r
 es/style.css">\r
-<script>\r
-if (window.testRunner) {\r
-  testRunner.dumpAsText();\r
-}\r
-</script>\r
-\r
 </head>\r
 \r
 <body>\r
similarity index 69%
rename from LayoutTests/mhtml/simple_page.html_original
rename to LayoutTests/mhtml/simple_page_ie-expected.html
index f2aef2f..5d4ae9f 100644 (file)
@@ -3,11 +3,7 @@
 
 
 <title>A simple page</title>
-<script>
-if (window.testRunner)
-  testRunner.dumpAsText();
-</script>
 </head><body>
 <h1>This is a very simple page</h1>
 Very <b>basic</b> page.
-</body></html>
\ No newline at end of file
+</body></html>
diff --git a/LayoutTests/mhtml/simple_page_ie-expected.txt b/LayoutTests/mhtml/simple_page_ie-expected.txt
deleted file mode 100644 (file)
index 74169e6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a very simple page
-
-Very basic page.
old mode 100755 (executable)
new mode 100644 (file)
index de2caa2..cf0d82f
@@ -12,10 +12,6 @@ X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16776
 <HTML><HEAD><TITLE>A simple page</TITLE>\r
 <META content=3D"text/html; charset=3Dwindows-1252" =\r
 http-equiv=3DContent-Type>\r
-<SCRIPT>=0A=\r
-if (window.testRunner)=0A=\r
-  testRunner.dumpAsText();=0A=\r
-</SCRIPT>\r
 \r
 <META name=3DGENERATOR content=3D"MSHTML 9.00.8112.16421"></HEAD>\r
 <BODY>\r
diff --git a/LayoutTests/mhtml/simple_page_unmht-expected.html b/LayoutTests/mhtml/simple_page_unmht-expected.html
new file mode 100644 (file)
index 0000000..5d4ae9f
--- /dev/null
@@ -0,0 +1,9 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+
+<title>A simple page</title>
+</head><body>
+<h1>This is a very simple page</h1>
+Very <b>basic</b> page.
+</body></html>
diff --git a/LayoutTests/mhtml/simple_page_unmht-expected.txt b/LayoutTests/mhtml/simple_page_unmht-expected.txt
deleted file mode 100644 (file)
index 74169e6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a very simple page
-
-Very basic page.
old mode 100755 (executable)
new mode 100644 (file)
index d03c63f..93524ce
@@ -16,10 +16,6 @@ Content-Location: http://localhost/simple_page.html
 \r
 \r
 <title>A simple page</title>\r
-<script>\r
-if (window.testRunner)\r
-  testRunner.dumpAsText();\r
-</script>\r
 <base href=3D"http://localhost/"></base></head><body>\r
 <h1>This is a very simple page</h1>\r
 Very <b>basic</b> page.\r