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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/htmlimports/import-innerHTML-blocked.html

Issue 1670203002: Block HTML Imports from loading when inserted via innerHTML. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <div></div>
9 <script>
10 document.querySelector('div').innerHTML = "<link rel='import' id='innerLink' h ref='resources/hello.html'>";
11 </script>
12 <link id="followingLink" rel="import" href="resources/hello.html">
13 <script>
14 test(function() {
15 assert_true(null == innerLink.import, 'Import via innerHTML');
kouhei (in TOK) 2016/02/08 01:00:31 ===?
16 assert_true(null != followingLink.import, 'Following import loaded');
kouhei (in TOK) 2016/02/08 01:00:31 !==?
17 }, 'Block imports via innerHTML.');
18 </script>
19 </body>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698