OLD | NEW |
1 (function() | 1 (function() |
2 { | 2 { |
3 let server = null; | 3 let server = null; |
4 let frame = null; | 4 let frame = null; |
5 let requestNotifier = null; | 5 let requestNotifier = null; |
6 let httpProtocol = null; | 6 let httpProtocol = null; |
7 | 7 |
8 module("Content policy", { | 8 module("Content policy", { |
9 setup: function() | 9 setup: function() |
10 { | 10 { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 "HTML image button inside a nested frame", | 93 "HTML image button inside a nested frame", |
94 '<iframe src="data:text/html,%3Ciframe%20src%3D%22data%3Atext%2Fhtml%2C%25
3Cinput%2520type%253D%2522image%2522%2520src%253D%2522http%253A%252F%252F127.0.0
.1%3A1234%252Ftest.gif%2522%253E%22%3E%3C%2Fiframe%3E"></iframe>', | 94 '<iframe src="data:text/html,%3Ciframe%20src%3D%22data%3Atext%2Fhtml%2C%25
3Cinput%2520type%253D%2522image%2522%2520src%253D%2522http%253A%252F%252F127.0.0
.1%3A1234%252Ftest.gif%2522%253E%22%3E%3C%2Fiframe%3E"></iframe>', |
95 "http://127.0.0.1:1234/test.gif", "image", false, false | 95 "http://127.0.0.1:1234/test.gif", "image", false, false |
96 ], | 96 ], |
97 [ | 97 [ |
98 "HTML image with srcset", | 98 "HTML image with srcset", |
99 '<img srcset="test.gif">', | 99 '<img srcset="test.gif">', |
100 "http://127.0.0.1:1234/test.gif", "image", false, false | 100 "http://127.0.0.1:1234/test.gif", "image", false, false |
101 ], | 101 ], |
102 [ | 102 [ |
| 103 "HTML picture", |
| 104 '<picture>' + |
| 105 '<source srcset="test.gif">' + |
| 106 '<img>' + |
| 107 '</picture>', |
| 108 "http://127.0.0.1:1234/test.gif", "image", false, false |
| 109 ], |
| 110 [ |
103 "Dynamically inserted image button", | 111 "Dynamically inserted image button", |
104 '<div id="insert"></div>' + | 112 '<div id="insert"></div>' + |
105 '<script>' + | 113 '<script>' + |
106 'window.addEventListener("DOMContentLoaded", function()' + | 114 'window.addEventListener("DOMContentLoaded", function()' + |
107 '{' + | 115 '{' + |
108 'var div = document.getElementById("insert");' + | 116 'var div = document.getElementById("insert");' + |
109 'div.innerHTML = \'<input type="image" id="image" src="test.gif">\';'
+ | 117 'div.innerHTML = \'<input type="image" id="image" src="test.gif">\';'
+ |
110 'var image = document.getElementById("image");' + | 118 'var image = document.getElementById("image");' + |
111 'image.onload = image.onerror = function ()' + | 119 'image.onload = image.onerror = function ()' + |
112 '{' + | 120 '{' + |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 for (let stage = 1; stage in stageDescriptions; stage++) | 477 for (let stage = 1; stage in stageDescriptions; stage++) |
470 { | 478 { |
471 let stageDescription = stageDescriptions[stage]; | 479 let stageDescription = stageDescriptions[stage]; |
472 if (stageDescription.indexOf("%S") >= 0) | 480 if (stageDescription.indexOf("%S") >= 0) |
473 stageDescription = stageDescription.replace("%S", expectedURL); | 481 stageDescription = stageDescription.replace("%S", expectedURL); |
474 | 482 |
475 asyncTest(name + " (" + stageDescription + ")", runTest.bind(null, tests[t
est], stage)); | 483 asyncTest(name + " (" + stageDescription + ")", runTest.bind(null, tests[t
est], stage)); |
476 } | 484 } |
477 } | 485 } |
478 })(); | 486 })(); |
OLD | NEW |