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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/fallback-image-moved-across-documents.html

Issue 2535383003: Collapse images disallowed by the Safe Browsing Subresource Filter. (Closed)
Patch Set: Phrasing. Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
dominicc (has gone to gerrit) 2016/12/05 03:30:55 Let's use testharness.js for new layout tests!
engedy 2016/12/06 15:27:57 Done.
2 <iframe src="about:blank" id="nested"></iframe>
3 <script type="text/javascript">
4 if (window.testRunner)
5 testRunner.waitUntilDone();
6
7 // Fallback content is implemented by means of shadow DOM, with a dumbed-down
dominicc (has gone to gerrit) 2016/12/05 03:30:55 Nice comment explaining the intent of the test and
engedy 2016/12/06 15:27:57 Thanks! By the way, are tests in these folder Bli
8 // HTMLImageElement instance used to render the broken image icon inside.
9 //
10 // When such an <img> element is moved to a new document after the shadow tree
11 // is created, care must be taken that there is no attempt to reload the broken
12 // image icon inside, fail, and end up with infinitely nested fallback content.
dominicc (has gone to gerrit) 2016/12/05 03:30:55 I'm curious--how would loading the broken image ic
engedy 2016/12/06 15:27:57 Done, I have extended the explanation.
13 let nestedDocument = document.getElementById("nested").contentDocument;
14 let i = nestedDocument.createElement("img");
15 i.onerror = function() {
16 i.onerror = function() {
17 if (window.testRunner)
18 testRunner.notifyDone();
19 };
20 document.body.appendChild(nestedDocument.body.removeChild(i));
dominicc (has gone to gerrit) 2016/12/05 03:30:55 Removes happen implicitly as part of apppend, appe
engedy 2016/12/06 15:27:57 Done.
21 };
22 i.src = "non-existent.png";
23 nestedDocument.body.appendChild(i);
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698