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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html

Issue 1882893002: Remove the line-number flakiness by adding an img element dynamically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html b/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html
index 0d705aa6ca5da95ab21199a80b4de370c8fc030b..6f512bf26bf91988fd1c11087858f6a1a7f7834f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html
@@ -1,8 +1,12 @@
-<img src="http://127.0.0.1:8080/security/resources/compass.jpg"
- srcset>
<script>
window.onload = function() {
- if (window.opener)
- window.opener.postMessage('done', '*');
+ var img = document.createElement('img');
+ img.src = "http://127.0.0.1:8080/security/resources/compass.jpg";
+ img.srcset = "";
Łukasz Anforowicz 2016/04/13 17:16:35 Please double-check. AFAICT this is equivalent to
+ img.addEventListener('load', function () {
+ if (window.opener)
+ window.opener.postMessage('done', '*');
+ });
+ document.body.appendChild(img);
};
</script>

Powered by Google App Engine
This is Rietveld 408576698