From abd0b16f66097fb5317221db993dafb6bd965965 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 20 May 2011 16:21:44 +0100 Subject: Add LayoutTests/fast/dom/HTMLLinkElement at r76408 Bug: 2268353 Change-Id: I3c351413cb223af72621b9b9f0336fc66a3d4fbc --- .../link-and-subresource-test-expected.txt | 10 ++++++ .../HTMLLinkElement/link-and-subresource-test.html | 39 +++++++++++++++++++++ .../onload-completion-test-expected.txt | 4 +++ .../HTMLLinkElement/onload-completion-test.html | 27 ++++++++++++++ .../HTMLLinkElement/pending-stylesheet-count.html | 32 +++++++++++++++++ .../HTMLLinkElement/prefetch-detached-expected.txt | 3 ++ .../dom/HTMLLinkElement/prefetch-detached.html | 20 +++++++++++ .../fast/dom/HTMLLinkElement/prefetch-expected.txt | 4 +++ .../HTMLLinkElement/prefetch-onload-expected.txt | 6 ++++ .../fast/dom/HTMLLinkElement/prefetch-onload.html | 29 +++++++++++++++ LayoutTests/fast/dom/HTMLLinkElement/prefetch.html | 23 ++++++++++++ LayoutTests/fast/dom/HTMLLinkElement/prefetch.link | 1 + .../fast/dom/HTMLLinkElement/resources/nick.jpg | Bin 0 -> 35637 bytes .../platform/android/layout_test_directories.txt | 1 + LayoutTests/platform/android/test_expectations.txt | 3 ++ 15 files changed, 202 insertions(+) create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/pending-stylesheet-count.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch.link create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/resources/nick.jpg (limited to 'LayoutTests') diff --git a/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-expected.txt new file mode 100644 index 0000000..ac1b174 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-expected.txt @@ -0,0 +1,10 @@ +nick.jpg has MIME type image/jpeg +nick.jpg has MIME type image/jpeg +This test verifies that an image which is prefetched, and which is also contained as a subresource of the current document can be loaded correctly as a subresource. See bug 49236 in which this wasn't working. + +When this test succeeds, you'll see an image of Nick on a sailboat immediately below this text. When this test fails, you will see no images at all. + +NICK_ONLOAD called +NICK_ONLOAD called +SUCCESS. Two loads. + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html new file mode 100644 index 0000000..594eafd --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html @@ -0,0 +1,39 @@ + + + +

This test verifies that an image which is prefetched, and which is also contained as a +subresource of the current document can be loaded correctly as a subresource. See +bug 49236 in which this wasn't working. +

When this test succeeds, you'll see an image of Nick on a sailboat immediately below +this text. When this test fails, you will see no images at all. + + +


+

    + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test-expected.txt new file mode 100644 index 0000000..bc6cf74 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test-expected.txt @@ -0,0 +1,4 @@ +This test verifies that at the time a body onload function is called that the subresources of this page (in particular the image) are already loaded. The page verifies that the image has the expected dimensions at the time of the onload event, and prints its result based on that. This is a regression test for a bug introduced by the patch for bug 3652. + + +SUCCESS. diff --git a/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html new file mode 100644 index 0000000..6e24184 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html @@ -0,0 +1,27 @@ + + + +

    This test verifies that at the time a body onload function is +called that the subresources of this page (in particular the image) +are already loaded. The page verifies that the image has the expected +dimensions at the time of the onload event, and prints its result +based on that. This is a regression test for a bug introduced by the +patch for bug 3652.

    + + + +
    + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/pending-stylesheet-count.html b/LayoutTests/fast/dom/HTMLLinkElement/pending-stylesheet-count.html new file mode 100644 index 0000000..435021b --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/pending-stylesheet-count.html @@ -0,0 +1,32 @@ + + + + + + +

    + This is a test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9252 + REGRESSION: Very odd roll-over issues (content disappearing). +

    +

    + There should be a green square below. +

    +
    +
    +
    + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached-expected.txt new file mode 100644 index 0000000..44311f8 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached-expected.txt @@ -0,0 +1,3 @@ +This test passes if it doesn't crash. + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html new file mode 100644 index 0000000..2d5d76c --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html @@ -0,0 +1,20 @@ + + + +

    This test passes if it doesn't crash.

    +
    + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-expected.txt new file mode 100644 index 0000000..9ea65dc --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-expected.txt @@ -0,0 +1,4 @@ +prefetch.link has MIME type application/octet-stream +This test requires DumpRenderTree to see the log of what resources are loaded. + +SUCCESS! prefetch onload called. diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload-expected.txt new file mode 100644 index 0000000..dac6e93 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload-expected.txt @@ -0,0 +1,6 @@ +This tests that onload events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onload event is their only programatic side-effect. + +If it works you should see a message below saying the test has passed. + +TEST PASSED. + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html new file mode 100644 index 0000000..37cfdbf --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html @@ -0,0 +1,29 @@ + + + + + +

    This tests that onload events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onload event is their only programatic side-effect.

    +

    If it works you should see a message below saying the test has passed.

    + +
    +

      + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch.html new file mode 100644 index 0000000..5c223f9 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch.html @@ -0,0 +1,23 @@ + + + +

      This test requires DumpRenderTree to see the log of what resources are loaded. + +

        + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch.link b/LayoutTests/fast/dom/HTMLLinkElement/prefetch.link new file mode 100644 index 0000000..9051267 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch.link @@ -0,0 +1 @@ +This is the link that is fetched by the prefetch-onload test diff --git a/LayoutTests/fast/dom/HTMLLinkElement/resources/nick.jpg b/LayoutTests/fast/dom/HTMLLinkElement/resources/nick.jpg new file mode 100644 index 0000000..3d9fb57 Binary files /dev/null and b/LayoutTests/fast/dom/HTMLLinkElement/resources/nick.jpg differ diff --git a/LayoutTests/platform/android/layout_test_directories.txt b/LayoutTests/platform/android/layout_test_directories.txt index 703c4da..a1288ac 100755 --- a/LayoutTests/platform/android/layout_test_directories.txt +++ b/LayoutTests/platform/android/layout_test_directories.txt @@ -18,6 +18,7 @@ fast/dom/HTMLFormElement fast/dom/HTMLHtmlElement fast/dom/HTMLKeygenElement fast/dom/HTMLLabelElement +fast/dom/HTMLLinklement fast/dom/HTMLMetaElement fast/dom/HTMLTableRowElement fast/dom/HTMLTableSectionElement diff --git a/LayoutTests/platform/android/test_expectations.txt b/LayoutTests/platform/android/test_expectations.txt index d0a039c..c42969c 100644 --- a/LayoutTests/platform/android/test_expectations.txt +++ b/LayoutTests/platform/android/test_expectations.txt @@ -40,6 +40,8 @@ fast/regex/slow.html CRASH // Causes DumpRenderTree to hang with V8 // This first block of tests are for features for which Android // should pass all tests. They are skipped only temporarily. // TODO: Fix these failing tests and remove them from this list. +fast/dom/HTMLLinkElement/link-and-subresource-test.html FAIL // Requires layoutTestController.dumpResourceResponseMIMETypes(), see http://b/issue?id=4470249 +fast/dom/HTMLLinkElement/prefetch.html FAIL // Requires layoutTestController.dumpResourceResponseMIMETypes(), see http://b/issue?id=4470249 fast/encoding/char-decoding.html FAIL // fails in Java HTTP stack, see http://b/issue?id=3047156 fast/encoding/hanarei-blog32-fc2-com.html FAIL // fails in Java HTTP stack, see http://b/issue?id=3046986 fast/encoding/mailto-always-utf-8.html FAIL // Requires waitForPolicyDelegate(), see http://b/issue?id=3043468 @@ -92,6 +94,7 @@ dom/xhtml/level3/core/nodegetbaseuri17.xhtml FAIL dom/xhtml/level3/core/nodegetbaseuri18.xhtml FAIL dom/xhtml/level3/core/nodelookupnamespaceuri01.xhtml FAIL dom/xhtml/level3/core/nodelookupprefix19.xhtml FAIL +fast/dom/HTMLLinkElement/pending-stylesheet-count.html FAIL // Expected failures for pixel tests fast/encoding/denormalised-voiced-japanese-chars.html FAIL -- cgit v1.1