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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-dynamic-width.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-dynamic-width.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-dynamic-width.html b/LayoutTests/fast/dom/HTMLImageElement/image-dynamic-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..cb6eef73abda64341963efcb545ad92b3420ed33
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-dynamic-width.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script>
+description("Test that creating a cached image and immediately checking its width works");
+jsTestIsAsync = true;
+var src = '../resources/abe.png?' + Math.random();
+var currentResult = false;
+function test(expected) {
+ var i = new Image();
+ i.src = src;
+ currentResult = (i.width == expected);
+ shouldBeTrue('currentResult');
+}
+test(0);
+onload = function(){
+ test(76);
+ finishJSTest();
+};
+</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/dom/HTMLImageElement/image-dynamic-width-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698