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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-innerHTML.html

Issue 136693020: Add image loading spec related tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed expectation for origin header test Created 6 years, 10 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: LayoutTests/fast/dom/HTMLImageElement/image-innerHTML.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-innerHTML.html b/LayoutTests/fast/dom/HTMLImageElement/image-innerHTML.html
new file mode 100644
index 0000000000000000000000000000000000000000..8ab8575df473fdb9880b29e0a052e95b78311d34
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-innerHTML.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<script>
+description("Tests that creating and setting the src of an image element inside an innerHTML actually loads the resource");
+jsTestIsAsync = true;
+
+var div = document.createElement('div');
+var div2 = document.createElement('div');
+var attemptedLoadDirect = false;
+var attemptedLoadIndirect = false;
+
+div.innerHTML = '<img src="../resources/abe.png" onload="attemptedLoadDirect = true;">';
+div2.innerHTML = '<div><img src="../resources/abe.png" onload="attemptedLoadIndirect = true;"></div>';
+document.body.onload = function() {
+ shouldBeTrue('attemptedLoadDirect');
+ shouldBeTrue('attemptedLoadIndirect');
+ finishJSTest();
+};
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698