<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[211280] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/211280">211280</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2017-01-27 02:49:23 -0800 (Fri, 27 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement dynamic-import for WebCore
https://bugs.webkit.org/show_bug.cgi?id=166926

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch introduces browser side dynamic-import implementation.
The dynamic-import is new ES feature which is now stage 3.
The JSC shell already implements it.

The dynamic-import allows us to kick module loading in a dynamic manner.
For example, you can write,

    await module = import(`${HOST}/hello.js`);

The dynamic `import` operator (this is not a function) returns a promise with
module namespace object if the module loading succeeds. Otherwise, it returns
a rejected promise.

And importantly, this feature allows us to kick module loading from classic script.
Previously, module loading can be only used from &lt;script type=&quot;module&quot;&gt; tag. And
all the module loading is done statically.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CachedModuleScriptLoader.cpp:
(WebCore::CachedModuleScriptLoader::load):
* bindings/js/CachedScriptFetcher.cpp:
(WebCore::CachedScriptFetcher::create):
(WebCore::CachedScriptFetcher::requestModuleScript):
requestModuleScript function is used only when loading a new module script.
So, LoadableClassicScript should use requestScriptWithCache to load itself.
We pass String() for cross origin mode for null cross origin attribute as
specified.

(WebCore::CachedScriptFetcher::requestScriptWithCache):
* bindings/js/CachedScriptFetcher.h:
(WebCore::CachedScriptFetcher::CachedScriptFetcher):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::moduleLoaderImportModule):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::resolveModuleSpecifier):
Extract the part of resolving module specifier to a static function to use
it in ScriptModuleLoader::resolve and ScriptModuleLoader::importModule.

(WebCore::ScriptModuleLoader::resolve):
(WebCore::rejectPromise):
(WebCore::ScriptModuleLoader::importModule):
New hook moduleLoaderImportModule is implemented. This hook is called when
`import` operator is used. This hook is responsible to
    1. resolve the module name to obtain module specifier. (like, resolve the
        relative URL to get absolute URL.)
    2. kick module loading with the resolved specifier.
When resolving the module name, the referrer information is needed.
For example, &quot;./script.js&quot; will be resolved to &quot;http://example.com/script.js&quot; if
the referrer module specifier is &quot;http://example.com/&quot;.
If `import(&quot;./script.js&quot;)` is executed in the classic script
src=&quot;http://example.com/test.js&quot;, it starts loading &quot;http://example.com/script.js&quot;.
So the information of the caller of `import` operator is necessary here.
This appropriate referrer is propagated by SourceOrigin.

* bindings/js/ScriptModuleLoader.h:
* dom/InlineClassicScript.h:
* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::load):
* dom/LoadableClassicScript.h:
* dom/LoadableModuleScript.h:
* dom/LoadableScript.h:
(WebCore::LoadableScript::LoadableScript):
(WebCore::LoadableScript::isClassicScript): Deleted.
(WebCore::LoadableScript::isModuleScript): Deleted.
* dom/ScriptElement.h:
* dom/ScriptElementCachedScriptFetcher.cpp: Copied from Source/WebCore/dom/InlineClassicScript.h.
(WebCore::ScriptElementCachedScriptFetcher::requestModuleScript):
This requestModuleScript will be used when the script tag (or modules imported from the script tag) uses `import` operator.
In classic scripts, `crossorigin` mode always becomes &quot;omit&quot; while module scripts
propagate the original `crossorigin` value.

* dom/ScriptElementCachedScriptFetcher.h: Copied from Source/WebCore/bindings/js/CachedScriptFetcher.h.
(WebCore::ScriptElementCachedScriptFetcher::crossOriginMode):
(WebCore::ScriptElementCachedScriptFetcher::ScriptElementCachedScriptFetcher):

LayoutTests:

* http/tests/misc/import-absolute-url-expected.txt: Added.
* http/tests/misc/import-absolute-url.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js: Added.
* http/tests/security/import-module-crossorigin-loads-error-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-error-src-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-error-src.html: Added.
* http/tests/security/import-module-crossorigin-loads-error.html: Added.
* http/tests/security/import-module-crossorigin-loads-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-src-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-src.html: Added.
* http/tests/security/import-module-crossorigin-loads.html: Added.
* http/tests/security/import-script-crossorigin-loads-error-expected.txt: Added.
* http/tests/security/import-script-crossorigin-loads-error.html: Added.
* http/tests/security/import-script-crossorigin-loads-omit-expected.txt: Added.
* http/tests/security/import-script-crossorigin-loads-omit.html: Added.
* http/tests/security/resources/cors-deny.php: Added.
* http/tests/security/resources/import-module-crossorigin-loads-error-src.js: Added.
(import.string_appeared_here.then):
* http/tests/security/resources/import-module-crossorigin-loads-src.js: Added.
(import.string_appeared_here.then):
* js/dom/modules/import-execution-order-expected.txt: Added.
* js/dom/modules/import-execution-order.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
* js/dom/modules/import-from-handler-expected.txt: Added.
* js/dom/modules/import-from-handler.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-javascript-url-expected.txt: Added.
* js/dom/modules/import-from-javascript-url.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
* js/dom/modules/import-from-loaded-classic-expected.txt: Added.
* js/dom/modules/import-from-loaded-classic.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-loaded-module-expected.txt: Added.
* js/dom/modules/import-from-loaded-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-module-expected.txt: Added.
* js/dom/modules/import-from-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-incorrect-relative-specifier-expected.txt: Added.
* js/dom/modules/import-incorrect-relative-specifier.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-simple-expected.txt: Added.
* js/dom/modules/import-simple.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/module-document-write-src.html:
* js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html:
* js/dom/modules/module-execution-order-mixed-with-classic-scripts.html:
* js/dom/modules/module-execution-order-mixed.html:
* js/dom/modules/module-inline-dynamic.html:
* js/dom/modules/module-inline-simple.html:
* js/dom/modules/module-load-event-with-src.html:
* js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html:
* js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html:
* js/dom/modules/module-load-same-module-from-different-entry-point.html:
* js/dom/modules/module-not-found-error-event-with-src-and-import.html:
* js/dom/modules/module-src-current-script.html:
* js/dom/modules/module-src-dynamic.html:
* js/dom/modules/module-src-simple.html:
* js/dom/modules/module-type-case-insensitive.html:
* js/dom/modules/module-will-fire-beforeload.html:
* js/dom/modules/nomodule-dynamic-classic-src.html:
* js/dom/modules/nomodule-has-no-effect-on-module-inline.html:
* js/dom/modules/nomodule-has-no-effect-on-module-src.html:
* js/dom/modules/nomodule-prevents-execution-classic-script-src.html:
* js/dom/modules/nomodule-reflect.html:
* js/dom/modules/resources/error-classic-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/error-classic-script.js.
* js/dom/modules/resources/import-from-loaded-classic-finish.js: Added.
* js/dom/modules/resources/import-from-loaded-classic.js: Added.
* js/dom/modules/resources/import-from-loaded-module-finish.js: Added.
* js/dom/modules/resources/import-from-loaded-module.js: Added.
* js/dom/modules/resources/module-document-write-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-document-write-src.js.
* js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js.
* js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js.
* js/dom/modules/resources/module-execution-order-mixed-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-2.js.
* js/dom/modules/resources/module-execution-order-mixed-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cappuccino.js.
* js/dom/modules/resources/module-execution-order-mixed-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cocoa.js.
* js/dom/modules/resources/module-execution-order-mixed-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-matcha.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-2.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cappuccino.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cocoa.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-matcha.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts.js.
* js/dom/modules/resources/module-execution-order-mixed.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed.js.
* js/dom/modules/resources/module-inline-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-dynamic.js.
* js/dom/modules/resources/module-inline-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-simple.js.
* js/dom/modules/resources/module-load-event-with-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-event-with-src.js.
* js/dom/modules/resources/module-load-same-module-from-different-entry-point.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-same-module-from-different-entry-point.js.
* js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-not-found-error-event-with-src-and-import.js.
* js/dom/modules/resources/module-src-current-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-current-script.js.
* js/dom/modules/resources/module-src-dynamic-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic-cocoa.js.
* js/dom/modules/resources/module-src-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic.js.
* js/dom/modules/resources/module-src-simple-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple-cocoa.js.
* js/dom/modules/resources/module-src-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple.js.
* js/dom/modules/resources/module-will-fire-beforeload.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-will-fire-beforeload.js.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduledocumentwritesrchtml">trunk/LayoutTests/js/dom/modules/module-document-write-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorhtml">trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleexecutionordermixedwithclassicscriptshtml">trunk/LayoutTests/js/dom/modules/module-execution-order-mixed-with-classic-scripts.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleexecutionordermixedhtml">trunk/LayoutTests/js/dom/modules/module-execution-order-mixed.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleinlinedynamichtml">trunk/LayoutTests/js/dom/modules/module-inline-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleinlinesimplehtml">trunk/LayoutTests/js/dom/modules/module-inline-simple.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleloadeventwithsrchtml">trunk/LayoutTests/js/dom/modules/module-load-event-with-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointdynamichtml">trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointinsrchtml">trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointhtml">trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmodulenotfounderroreventwithsrcandimporthtml">trunk/LayoutTests/js/dom/modules/module-not-found-error-event-with-src-and-import.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmodulesrccurrentscripthtml">trunk/LayoutTests/js/dom/modules/module-src-current-script.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmodulesrcdynamichtml">trunk/LayoutTests/js/dom/modules/module-src-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmodulesrcsimplehtml">trunk/LayoutTests/js/dom/modules/module-src-simple.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmoduletypecaseinsensitivehtml">trunk/LayoutTests/js/dom/modules/module-type-case-insensitive.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesmodulewillfirebeforeloadhtml">trunk/LayoutTests/js/dom/modules/module-will-fire-beforeload.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrchtml">trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlinehtml">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrchtml">trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulereflecthtml">trunk/LayoutTests/js/dom/modules/nomodule-reflect.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesscripttestserrorclassicscriptjs">trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCachedModuleScriptLoadercpp">trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCachedScriptFetchercpp">trunk/Source/WebCore/bindings/js/CachedScriptFetcher.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCachedScriptFetcherh">trunk/Source/WebCore/bindings/js/CachedScriptFetcher.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBaseh">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSLazyEventListenercpp">trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptModuleLoadercpp">trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptModuleLoaderh">trunk/Source/WebCore/bindings/js/ScriptModuleLoader.h</a></li>
<li><a href="#trunkSourceWebCoredomInlineClassicScripth">trunk/Source/WebCore/dom/InlineClassicScript.h</a></li>
<li><a href="#trunkSourceWebCoredomLoadableClassicScriptcpp">trunk/Source/WebCore/dom/LoadableClassicScript.cpp</a></li>
<li><a href="#trunkSourceWebCoredomLoadableClassicScripth">trunk/Source/WebCore/dom/LoadableClassicScript.h</a></li>
<li><a href="#trunkSourceWebCoredomLoadableModuleScripth">trunk/Source/WebCore/dom/LoadableModuleScript.h</a></li>
<li><a href="#trunkSourceWebCoredomLoadableScripth">trunk/Source/WebCore/dom/LoadableScript.h</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementh">trunk/Source/WebCore/dom/ScriptElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmiscimportabsoluteurlexpectedtxt">trunk/LayoutTests/http/tests/misc/import-absolute-url-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmiscimportabsoluteurlhtml">trunk/LayoutTests/http/tests/misc/import-absolute-url.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11importscriptnonceexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11importscriptnoncehtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed1js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed2js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed3js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed4js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed5js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed6js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked1js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked2js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked3js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked4js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked5js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked6js">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorexpectedtxt">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorsrcexpectedtxt">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorsrchtml">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorhtml">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadsexpectedtxt">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadssrcexpectedtxt">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadssrchtml">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadshtml">trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadserrorexpectedtxt">trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadserrorhtml">trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadsomitexpectedtxt">trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadsomithtml">trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityresourcescorsdenyphp">trunk/LayoutTests/http/tests/security/resources/cors-deny.php</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityresourcesimportmodulecrossoriginloadserrorsrcjs">trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-error-src.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityresourcesimportmodulecrossoriginloadssrcjs">trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-src.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportexecutionorderexpectedtxt">trunk/LayoutTests/js/dom/modules/import-execution-order-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportexecutionorderhtml">trunk/LayoutTests/js/dom/modules/import-execution-order.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromhandlerexpectedtxt">trunk/LayoutTests/js/dom/modules/import-from-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromhandlerhtml">trunk/LayoutTests/js/dom/modules/import-from-handler.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromjavascripturlexpectedtxt">trunk/LayoutTests/js/dom/modules/import-from-javascript-url-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromjavascripturlhtml">trunk/LayoutTests/js/dom/modules/import-from-javascript-url.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromloadedclassicexpectedtxt">trunk/LayoutTests/js/dom/modules/import-from-loaded-classic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromloadedclassichtml">trunk/LayoutTests/js/dom/modules/import-from-loaded-classic.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromloadedmoduleexpectedtxt">trunk/LayoutTests/js/dom/modules/import-from-loaded-module-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfromloadedmodulehtml">trunk/LayoutTests/js/dom/modules/import-from-loaded-module.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfrommoduleexpectedtxt">trunk/LayoutTests/js/dom/modules/import-from-module-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportfrommodulehtml">trunk/LayoutTests/js/dom/modules/import-from-module.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportincorrectrelativespecifierexpectedtxt">trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportincorrectrelativespecifierhtml">trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportsimpleexpectedtxt">trunk/LayoutTests/js/dom/modules/import-simple-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportsimplehtml">trunk/LayoutTests/js/dom/modules/import-simple.html</a></li>
<li>trunk/LayoutTests/js/dom/modules/resources/</li>
<li><a href="#trunkLayoutTestsjsdommodulesresourceserrorclassicscriptjs">trunk/LayoutTests/js/dom/modules/resources/error-classic-script.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesimportfromloadedclassicfinishjs">trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic-finish.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesimportfromloadedclassicjs">trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesimportfromloadedmodulefinishjs">trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module-finish.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesimportfromloadedmodulejs">trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesimportsrcsimplejs">trunk/LayoutTests/js/dom/modules/resources/import-src-simple.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduledocumentwritesrcjs">trunk/LayoutTests/js/dom/modules/resources/module-document-write-src.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorthrowjs">trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorjs">trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixed2js">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-2.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedcappuccinojs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cappuccino.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedcocoajs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cocoa.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedmatchajs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-matcha.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscripts2js">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptscappuccinojs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptscocoajs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptsmatchajs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptsjs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedjs">trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleinlinedynamicjs">trunk/LayoutTests/js/dom/modules/resources/module-inline-dynamic.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleinlinesimplejs">trunk/LayoutTests/js/dom/modules/resources/module-inline-simple.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleloadeventwithsrcjs">trunk/LayoutTests/js/dom/modules/resources/module-load-event-with-src.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmoduleloadsamemodulefromdifferententrypointjs">trunk/LayoutTests/js/dom/modules/resources/module-load-same-module-from-different-entry-point.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulenotfounderroreventwithsrcandimportjs">trunk/LayoutTests/js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulesrccurrentscriptjs">trunk/LayoutTests/js/dom/modules/resources/module-src-current-script.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulesrcdynamiccocoajs">trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic-cocoa.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulesrcdynamicjs">trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulesrcsimplecocoajs">trunk/LayoutTests/js/dom/modules/resources/module-src-simple-cocoa.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulesrcsimplejs">trunk/LayoutTests/js/dom/modules/resources/module-src-simple.js</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesresourcesmodulewillfirebeforeloadjs">trunk/LayoutTests/js/dom/modules/resources/module-will-fire-beforeload.js</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementCachedScriptFetchercpp">trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementCachedScriptFetcherh">trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/ChangeLog        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -1,3 +1,110 @@
</span><ins>+2017-01-27  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Implement dynamic-import for WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=166926
+
+        Reviewed by Ryosuke Niwa.
+
+        * http/tests/misc/import-absolute-url-expected.txt: Added.
+        * http/tests/misc/import-absolute-url.html: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js: Added.
+        * http/tests/security/import-module-crossorigin-loads-error-expected.txt: Added.
+        * http/tests/security/import-module-crossorigin-loads-error-src-expected.txt: Added.
+        * http/tests/security/import-module-crossorigin-loads-error-src.html: Added.
+        * http/tests/security/import-module-crossorigin-loads-error.html: Added.
+        * http/tests/security/import-module-crossorigin-loads-expected.txt: Added.
+        * http/tests/security/import-module-crossorigin-loads-src-expected.txt: Added.
+        * http/tests/security/import-module-crossorigin-loads-src.html: Added.
+        * http/tests/security/import-module-crossorigin-loads.html: Added.
+        * http/tests/security/import-script-crossorigin-loads-error-expected.txt: Added.
+        * http/tests/security/import-script-crossorigin-loads-error.html: Added.
+        * http/tests/security/import-script-crossorigin-loads-omit-expected.txt: Added.
+        * http/tests/security/import-script-crossorigin-loads-omit.html: Added.
+        * http/tests/security/resources/cors-deny.php: Added.
+        * http/tests/security/resources/import-module-crossorigin-loads-error-src.js: Added.
+        (import.string_appeared_here.then):
+        * http/tests/security/resources/import-module-crossorigin-loads-src.js: Added.
+        (import.string_appeared_here.then):
+        * js/dom/modules/import-execution-order-expected.txt: Added.
+        * js/dom/modules/import-execution-order.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
+        * js/dom/modules/import-from-handler-expected.txt: Added.
+        * js/dom/modules/import-from-handler.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/import-from-javascript-url-expected.txt: Added.
+        * js/dom/modules/import-from-javascript-url.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
+        * js/dom/modules/import-from-loaded-classic-expected.txt: Added.
+        * js/dom/modules/import-from-loaded-classic.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/import-from-loaded-module-expected.txt: Added.
+        * js/dom/modules/import-from-loaded-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/import-from-module-expected.txt: Added.
+        * js/dom/modules/import-from-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/import-incorrect-relative-specifier-expected.txt: Added.
+        * js/dom/modules/import-incorrect-relative-specifier.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/import-simple-expected.txt: Added.
+        * js/dom/modules/import-simple.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
+        * js/dom/modules/module-document-write-src.html:
+        * js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html:
+        * js/dom/modules/module-execution-order-mixed-with-classic-scripts.html:
+        * js/dom/modules/module-execution-order-mixed.html:
+        * js/dom/modules/module-inline-dynamic.html:
+        * js/dom/modules/module-inline-simple.html:
+        * js/dom/modules/module-load-event-with-src.html:
+        * js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html:
+        * js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html:
+        * js/dom/modules/module-load-same-module-from-different-entry-point.html:
+        * js/dom/modules/module-not-found-error-event-with-src-and-import.html:
+        * js/dom/modules/module-src-current-script.html:
+        * js/dom/modules/module-src-dynamic.html:
+        * js/dom/modules/module-src-simple.html:
+        * js/dom/modules/module-type-case-insensitive.html:
+        * js/dom/modules/module-will-fire-beforeload.html:
+        * js/dom/modules/nomodule-dynamic-classic-src.html:
+        * js/dom/modules/nomodule-has-no-effect-on-module-inline.html:
+        * js/dom/modules/nomodule-has-no-effect-on-module-src.html:
+        * js/dom/modules/nomodule-prevents-execution-classic-script-src.html:
+        * js/dom/modules/nomodule-reflect.html:
+        * js/dom/modules/resources/error-classic-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/error-classic-script.js.
+        * js/dom/modules/resources/import-from-loaded-classic-finish.js: Added.
+        * js/dom/modules/resources/import-from-loaded-classic.js: Added.
+        * js/dom/modules/resources/import-from-loaded-module-finish.js: Added.
+        * js/dom/modules/resources/import-from-loaded-module.js: Added.
+        * js/dom/modules/resources/module-document-write-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-document-write-src.js.
+        * js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js.
+        * js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js.
+        * js/dom/modules/resources/module-execution-order-mixed-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-2.js.
+        * js/dom/modules/resources/module-execution-order-mixed-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cappuccino.js.
+        * js/dom/modules/resources/module-execution-order-mixed-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cocoa.js.
+        * js/dom/modules/resources/module-execution-order-mixed-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-matcha.js.
+        * js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-2.js.
+        * js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cappuccino.js.
+        * js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cocoa.js.
+        * js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-matcha.js.
+        * js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts.js.
+        * js/dom/modules/resources/module-execution-order-mixed.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed.js.
+        * js/dom/modules/resources/module-inline-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-dynamic.js.
+        * js/dom/modules/resources/module-inline-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-simple.js.
+        * js/dom/modules/resources/module-load-event-with-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-event-with-src.js.
+        * js/dom/modules/resources/module-load-same-module-from-different-entry-point.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-same-module-from-different-entry-point.js.
+        * js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-not-found-error-event-with-src-and-import.js.
+        * js/dom/modules/resources/module-src-current-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-current-script.js.
+        * js/dom/modules/resources/module-src-dynamic-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic-cocoa.js.
+        * js/dom/modules/resources/module-src-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic.js.
+        * js/dom/modules/resources/module-src-simple-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple-cocoa.js.
+        * js/dom/modules/resources/module-src-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple.js.
+        * js/dom/modules/resources/module-will-fire-beforeload.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-will-fire-beforeload.js.
+
</ins><span class="cx"> 2017-01-26  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash when navigating back to a page in PacheCache when one of its frames has been removed
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscimportabsoluteurlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/import-absolute-url-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/import-absolute-url-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/misc/import-absolute-url-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Test modules with absolute URLs.
+http://127.0.0.1:8000/misc/resources/module-absolute-url2.js
+http://127.0.0.1:8000/misc/resources/module-absolute-url.js
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscimportabsoluteurlhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/import-absolute-url.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/import-absolute-url.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/misc/import-absolute-url.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;UTF-8&quot;&gt;
+&lt;script src=&quot;../../js-test-resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+Test modules with absolute URLs.&lt;hr&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+var jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+import(&quot;http://127.0.0.1:8000/misc/resources/module-absolute-url.js&quot;).then(finishJSTest);
+&lt;/script&gt;
+&lt;script src=&quot;../../js-test-resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11importscriptnonceexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+CONSOLE MESSAGE: line 61: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+CONSOLE MESSAGE: line 67: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+CONSOLE MESSAGE: line 73: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+CONSOLE MESSAGE: line 79: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+CONSOLE MESSAGE: line 85: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+CONSOLE MESSAGE: line 91: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.
+ALERT: 1,2,3,4,5,6
+This tests the effect of a script-nonce value.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11importscriptnoncehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;script-src 'nonce-noncynonce' 'nonce-noncy+/=nonce'&quot;&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;script nonce=&quot;noncynonce&quot;&gt;
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        var modules = new Set([
+            'allow1',
+            'allow2',
+            'allow3',
+        ]);
+
+        var array = [];
+        var count = 0;
+        function ok(num)
+        {
+            // load should be done for module tags before calling the result of import.
+            if (modules.has(`allow${num}`))
+                error(num);
+            array.push(num);
+            if (array.length === 6) {
+                alert(array.sort().toString());
+                done(&quot;PASS&quot;);
+            }
+        }
+
+        document.body.addEventListener('load', function (ev) {
+            let id = ev.target.id;
+            if (modules.has(id))
+                modules.delete(id);
+            else if (id)
+                error(id);
+        }, /* capture */ true);
+
+        document.body.addEventListener('error', function (ev) {
+            error(ev.target.id);
+        }, /* capture */ true);
+
+
+        function error(num)
+        {
+            alert(`FAIL (${num})`);
+        }
+
+        function done(msg) {
+            document.querySelector(&quot;pre&quot;).innerHTML = msg;
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+        &lt;/script&gt;
+
+        &lt;script type=&quot;module&quot; nonce=&quot;noncynonce&quot; id=&quot;allow1&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed1.js&quot;);
+        &lt;/script&gt;
+        &lt;script type=&quot;module&quot; nonce=&quot;noncynonce noncynonce&quot; id=&quot;block1&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked1.js&quot;);
+        &lt;/script&gt;
+        &lt;script type=&quot;module&quot; nonce=&quot;noncynonce&quot; id=&quot;allow2&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed2.js&quot;);
+        &lt;/script&gt;
+        &lt;script type=&quot;module&quot; id=&quot;block2&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked2.js&quot;);
+        &lt;/script&gt;
+        &lt;script type=&quot;module&quot; nonce=&quot;noncy+/=nonce&quot; id=&quot;allow3&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed3.js&quot;);
+        &lt;/script&gt;
+        &lt;script type=&quot;module&quot; nonce=&quot;noncynonceno?&quot; id=&quot;block3&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked3.js&quot;);
+        &lt;/script&gt;
+        &lt;script nonce=&quot;noncynonce&quot; id=&quot;allow4&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed4.js&quot;);
+        &lt;/script&gt;
+        &lt;script nonce=&quot;noncynonce noncynonce&quot; id=&quot;block4&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked4.js&quot;);
+        &lt;/script&gt;
+        &lt;script nonce=&quot;noncynonce&quot; id=&quot;allow5&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed5.js&quot;);
+        &lt;/script&gt;
+        &lt;script id=&quot;block5&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked5.js&quot;);
+        &lt;/script&gt;
+        &lt;script nonce=&quot;noncy+/=nonce&quot; id=&quot;allow6&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-allowed6.js&quot;);
+        &lt;/script&gt;
+        &lt;script nonce=&quot;noncynonceno?&quot; id=&quot;block6&quot;&gt;
+            import(&quot;./resources/import-scriptnonce-blocked6.js&quot;);
+        &lt;/script&gt;
+        &lt;p&gt;
+            This tests the effect of a script-nonce value.
+        &lt;/p&gt;
+        &lt;pre&gt;&lt;/pre&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(1);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed2js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(2);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed3js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(3);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed4js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(4);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed5js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(5);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceallowed6js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ok(6);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(1);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked2js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(2);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked3js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(3);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked4js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(4);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked5js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(5);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11resourcesimportscriptnonceblocked6js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+error(6);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
+This test passes if the module script does not load.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorsrcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
+This test passes if the module script does not load.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorsrchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script does not load.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+&lt;/script&gt;
+&lt;script type=&quot;module&quot; src=&quot;./resources/import-module-crossorigin-loads-error-src.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadserrorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-error.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script does not load.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+&lt;/script&gt;
+&lt;script type=&quot;module&quot;&gt;
+import(&quot;http://localhost:8000/security/resources/cors-deny.php?credentials=true&quot;).then(
+    function() { done(&quot;FAIL&quot;);},
+    function() { done(&quot;PASS&quot;); });
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+ALERT: script ran.
+This test passes if the module script loads.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadssrcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+ALERT: script ran.
+This test passes if the module script loads.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadssrchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script loads.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+&lt;/script&gt;
+&lt;script type=&quot;module&quot; src=&quot;./resources/import-module-crossorigin-loads-src.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportmodulecrossoriginloadshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-module-crossorigin-loads.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script loads.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+&lt;/script&gt;
+&lt;script type=&quot;module&quot;&gt;
+// Executed with &quot;omit&quot;.
+// https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
+import(&quot;http://localhost:8000/security/resources/cors-script.php?credentials=false&quot;).then(
+    function() { done(&quot;PASS&quot;);},
+    function() { done(&quot;FAIL&quot;); });
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadserrorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
+This test passes if the module script does not load.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadserrorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-error.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script does not load.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script crossorigin=&quot;use-credentials&quot;&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+// Executed with &quot;omit&quot;.
+// https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
+import(&quot;http://localhost:8000/security/resources/cors-deny.php?credentials=true&quot;).then(
+    function() { done(&quot;FAIL&quot;);},
+    function() { done(&quot;PASS&quot;); });
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadsomitexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+ALERT: script ran.
+This test passes if the module script loads.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityimportscriptcrossoriginloadsomithtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/import-script-crossorigin-loads-omit.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;body&gt;
+&lt;p&gt;This test passes if the module script loads.&lt;/p&gt;
+&lt;pre&gt;&lt;/pre&gt;
+&lt;script crossorigin=&quot;use-credentials&quot;&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function done(msg) {
+    document.querySelector(&quot;pre&quot;).innerHTML = msg;
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+// Executed with &quot;omit&quot;.
+// https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
+import(&quot;http://localhost:8000/security/resources/cors-script.php?credentials=false&quot;).then(
+    function() { done(&quot;PASS&quot;);},
+    function() { done(&quot;FAIL&quot;); });
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityresourcescorsdenyphp"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/resources/cors-deny.php (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/resources/cors-deny.php                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/resources/cors-deny.php        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;?php
+header(&quot;Access-Control-Allow-Origin: http://example.org/&quot;);
+header(&quot;Content-Type: application/javascript&quot;);
+
+if (isset($_GET[&quot;credentials&quot;])) {
+    if (strtolower($_GET[&quot;credentials&quot;]) == &quot;true&quot;)
+        header(&quot;Access-Control-Allow-Credentials: true&quot;);
+    else
+        header(&quot;Access-Control-Allow-Credentials: false&quot;);
+}
+
+if (strtolower($_GET[&quot;fail&quot;]) == &quot;true&quot;)
+    echo &quot;throw({toString: function(){ return 'SomeError' }});&quot;;
+else
+    echo &quot;alert('script ran.');&quot;;
+?&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/http/tests/security/resources/cors-deny.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<ins>+*
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestshttptestssecurityresourcesimportmodulecrossoriginloadserrorsrcjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-error-src.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-error-src.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-error-src.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+import(&quot;http://localhost:8000/security/resources/cors-deny.php?credentials=true&quot;).then(
+    function() { done(&quot;FAIL&quot;);},
+    function() { done(&quot;PASS&quot;); });
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityresourcesimportmodulecrossoriginloadssrcjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-src.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-src.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/resources/import-module-crossorigin-loads-src.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+// Executed with &quot;omit&quot;.
+// https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
+import(&quot;http://localhost:8000/security/resources/cors-script.php?credentials=false&quot;).then(
+    function() { done(&quot;PASS&quot;);},
+    function() { done(&quot;FAIL&quot;); });
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportexecutionorderexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-execution-order-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-execution-order-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-execution-order-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Test import execution order.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+PASS count++ is 0
+PASS count++ is 1
+PASS count++ is 2
+PASS count++ is 3
+PASS count++ is 4
+PASS count++ is 5
+PASS count++ is 6
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportexecutionorderhtmlfromrev211277trunkLayoutTestsjsdommodulesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-execution-order.html (from rev 211277, trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-execution-order.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-execution-order.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import execution order.');
+window.count = 0;
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+debug('Module is not executed yet.');
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+(async function () {
+    await import(`./resources/module-execution-order-mixed.js`);
+    shouldBe(&quot;count++&quot;, &quot;4&quot;);
+    await import(`./resources/module-execution-order-mixed-2.js`);
+    shouldBe(&quot;count++&quot;, &quot;6&quot;);
+    finishJSTest();
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-handler-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-handler-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test import from handler.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;nice&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+MODULE
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromhandlerhtmlfromrev211277trunkLayoutTestsjsdommodulesmodulesrcsimplehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-from-handler.html (from rev 211277, trunk/LayoutTests/js/dom/modules/module-src-simple.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-handler.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-handler.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import from handler.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;a id=&quot;target&quot; onclick=&quot;(import(`./resources/module-src-simple.js`)).then(() =&gt; finishJSTest())&quot;&gt;MODULE&lt;/a&gt;
+&lt;script type=&quot;module&quot;&gt;
+debug('Module is not executed yet.');
+let anchor = document.getElementById('target');
+anchor.dispatchEvent(new MouseEvent('click'));
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromjavascripturlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-javascript-url-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-javascript-url-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-javascript-url-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test import from javascript URL.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;nice&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+MODULE
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromjavascripturlhtmlfromrev211277trunkLayoutTestsjsdommodulesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-from-javascript-url.html (from rev 211277, trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-javascript-url.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-javascript-url.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import from javascript URL.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;a id=&quot;target&quot; href=&quot;javascript:void((import(`./resources/module-src-simple.js`)).then(() =&gt; finishJSTest()))&quot;&gt;MODULE&lt;/a&gt;
+&lt;script type=&quot;module&quot;&gt;
+debug('Module is not executed yet.');
+let anchor = document.getElementById('target');
+anchor.dispatchEvent(new MouseEvent('click'));
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromloadedclassicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-loaded-classic-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-loaded-classic-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-loaded-classic-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Test import from loaded classic.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+import from loaded classic
+import from loaded classic finish
+PASS window.imported is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromloadedclassichtmlfromrev211277trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-from-loaded-classic.html (from rev 211277, trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-loaded-classic.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-loaded-classic.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import from loaded classic.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+
+function loaded()
+{
+    shouldBeTrue(`window.imported`);
+    finishJSTest();
+}
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;./resources/import-from-loaded-classic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromloadedmoduleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-loaded-module-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-loaded-module-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-loaded-module-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Test import from loaded module.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+import from loaded module
+import from loaded module finish
+PASS window.imported is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfromloadedmodulehtmlfromrev211277trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-from-loaded-module.html (from rev 211277, trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-loaded-module.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-loaded-module.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import from loaded module.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+
+function loaded()
+{
+    shouldBeTrue(`window.imported`);
+    finishJSTest();
+}
+
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script type=&quot;module&quot; src=&quot;./resources/import-from-loaded-module.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfrommoduleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-module-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-module-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-module-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test import from module script.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;nice&quot;
+PASS window.imported is true
+PASS window.passedCocoa is window.exportedCocoa
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportfrommodulehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-from-module.html (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-from-module.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-from-module.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import from module script.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+window.passedCocoa = null;
+
+function loaded(cocoa)
+{
+    window.passedCocoa = cocoa;
+    shouldBeTrue(`window.imported`);
+    shouldBe(`window.passedCocoa`, `window.exportedCocoa`);
+    finishJSTest();
+}
+
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script type=&quot;module&quot;&gt;
+(async function() {
+    debug('Module is not executed yet.');
+    let ns = await import(`./resources/import-src-simple.js`);
+    loaded(ns.ok);
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportincorrectrelativespecifierexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Test import rejects the incorrect relative specifiers.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS import(&quot;incorrect&quot;) rejected promise  with TypeError: Module specifier does not start with &quot;/&quot;, &quot;./&quot;, or &quot;../&quot;..
+PASS import(&quot;$hello&quot;) rejected promise  with TypeError: Module specifier does not start with &quot;/&quot;, &quot;./&quot;, or &quot;../&quot;..
+PASS import(&quot;.../test&quot;) rejected promise  with TypeError: Module specifier does not start with &quot;/&quot;, &quot;./&quot;, or &quot;../&quot;..
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportincorrectrelativespecifierhtmlfromrev211277trunkLayoutTestsjsdommodulesmodulesrcsimplehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier.html (from rev 211277, trunk/LayoutTests/js/dom/modules/module-src-simple.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-incorrect-relative-specifier.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import rejects the incorrect relative specifiers.');
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+(async function () {
+    await shouldReject(`import(&quot;incorrect&quot;)`);
+    await shouldReject(`import(&quot;$hello&quot;)`);
+    await shouldReject(`import(&quot;.../test&quot;)`);
+    finishJSTest();
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportsimpleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-simple-expected.txt (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-simple-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-simple-expected.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test import simple.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;nice&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportsimplehtmlfromrev211277trunkLayoutTestsjsdommodulesmodulesrcsimplehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/import-simple.html (from rev 211277, trunk/LayoutTests/js/dom/modules/module-src-simple.html) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-simple.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-simple.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import simple.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+(async function() {
+    debug('Module is not executed yet.');
+    await import(`./resources/module-src-simple.js`);
+    finishJSTest();
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduledocumentwritesrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-document-write-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-document-write-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-document-write-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -14,6 +14,6 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-document-write-src.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-document-write-src.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><del>-import &quot;./script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js&quot;
</del><ins>+import &quot;./resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js&quot;
</ins><span class="cx"> testFailed(&quot;executed&quot;);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleexecutionordermixedwithclassicscriptshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-execution-order-mixed-with-classic-scripts.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-execution-order-mixed-with-classic-scripts.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-execution-order-mixed-with-classic-scripts.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;1&quot;);
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-execution-order-mixed-with-classic-scripts.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-execution-order-mixed-with-classic-scripts.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;2&quot;);
</span><span class="cx"> &lt;/script&gt;
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;3&quot;);
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-execution-order-mixed-with-classic-scripts-2.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-execution-order-mixed-with-classic-scripts-2.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;4&quot;);
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleexecutionordermixedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-execution-order-mixed.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-execution-order-mixed.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-execution-order-mixed.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -14,11 +14,11 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-execution-order-mixed.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-execution-order-mixed.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;4&quot;);
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-execution-order-mixed-2.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-execution-order-mixed-2.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><span class="cx"> shouldBe(&quot;count++&quot;, &quot;6&quot;);
</span><span class="cx"> finishJSTest();
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleinlinedynamichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-inline-dynamic.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-inline-dynamic.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-inline-dynamic.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> (function () {
</span><span class="cx">     var element = document.createElement(&quot;script&quot;);
</span><span class="cx">     element.textContent = `
</span><del>-        import Cocoa from &quot;./script-tests/module-inline-dynamic.js&quot;;
</del><ins>+        import Cocoa from &quot;./resources/module-inline-dynamic.js&quot;;
</ins><span class="cx">         var cocoa = new Cocoa();
</span><span class="cx"> 
</span><span class="cx">         debug(&quot;Module execution is confined in the module environment.&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleinlinesimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-inline-simple.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-inline-simple.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-inline-simple.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><del>-import Cocoa from &quot;./script-tests/module-inline-simple.js&quot;;
</del><ins>+import Cocoa from &quot;./resources/module-inline-simple.js&quot;;
</ins><span class="cx"> var cocoa = new Cocoa();
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;Module execution is confined in the module environment.&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleloadeventwithsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-load-event-with-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-load-event-with-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-load-event-with-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -16,6 +16,6 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; onload=&quot;onLoad()&quot; src=&quot;script-tests/module-load-event-with-src.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; onload=&quot;onLoad()&quot; src=&quot;resources/module-load-event-with-src.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointdynamichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -20,12 +20,12 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><del>-import &quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot;
</del><ins>+import &quot;./resources/module-load-same-module-from-different-entry-point.js&quot;
</ins><span class="cx"> debug('Executing the module.');
</span><span class="cx"> shouldBe(`window.moduleExecutedCount`, `1`);
</span><span class="cx"> var element = document.createElement(&quot;script&quot;);
</span><span class="cx"> element.type = &quot;module&quot;;
</span><del>-element.innerText = `import &quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot;`;
</del><ins>+element.innerText = `import &quot;./resources/module-load-same-module-from-different-entry-point.js&quot;`;
</ins><span class="cx"> element.onload = onLoad;
</span><span class="cx"> document.body.appendChild(element);
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointinsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -22,8 +22,8 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot; onload=&quot;onLoad()&quot;&gt;&lt;/script&gt;
-&lt;script type=&quot;module&quot; src=&quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot; onload=&quot;onLoad()&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;./resources/module-load-same-module-from-different-entry-point.js&quot; onload=&quot;onLoad()&quot;&gt;&lt;/script&gt;
+&lt;script type=&quot;module&quot; src=&quot;./resources/module-load-same-module-from-different-entry-point.js&quot; onload=&quot;onLoad()&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><span class="cx"> finish();
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduleloadsamemodulefromdifferententrypointhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-load-same-module-from-different-entry-point.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -24,12 +24,12 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script type=&quot;module&quot; onload=&quot;onLoad()&quot;&gt;
</span><del>-import &quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot;
</del><ins>+import &quot;./resources/module-load-same-module-from-different-entry-point.js&quot;
</ins><span class="cx"> debug('Executing the module.');
</span><span class="cx"> window.firstModuleIsExecuted = true;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script type=&quot;module&quot; onload=&quot;onLoad()&quot;&gt;
</span><del>-import &quot;./script-tests/module-load-same-module-from-different-entry-point.js&quot;
</del><ins>+import &quot;./resources/module-load-same-module-from-different-entry-point.js&quot;
</ins><span class="cx"> debug('Executing the module.');
</span><span class="cx"> window.secondModuleIsExecuted = true;
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmodulenotfounderroreventwithsrcandimporthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-not-found-error-event-with-src-and-import.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-not-found-error-event-with-src-and-import.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-not-found-error-event-with-src-and-import.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;script-tests/module-not-found-error-event-with-src-and-import.js&quot; onerror=&quot;onError()&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;resources/module-not-found-error-event-with-src-and-import.js&quot; onerror=&quot;onError()&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script type=&quot;module&quot;&gt;
</span><span class="cx"> shouldNotBe(`error`, `null`);
</span><span class="cx"> shouldBe(`error.type`, `&quot;error&quot;`);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmodulesrccurrentscripthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-src-current-script.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-src-current-script.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-src-current-script.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -14,6 +14,6 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;./script-tests/module-src-current-script.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;./resources/module-src-current-script.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmodulesrcdynamichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-src-dynamic.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-src-dynamic.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-src-dynamic.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> (function () {
</span><span class="cx">     var element = document.createElement('script');
</span><span class="cx">     element.type = 'module';
</span><del>-    element.src = './script-tests/module-src-dynamic.js';
</del><ins>+    element.src = './resources/module-src-dynamic.js';
</ins><span class="cx">     document.body.appendChild(element);
</span><span class="cx"> }());
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmodulesrcsimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-src-simple.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-src-simple.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-src-simple.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -14,6 +14,6 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; src=&quot;./script-tests/module-src-simple.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; src=&quot;./resources/module-src-simple.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmoduletypecaseinsensitivehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-type-case-insensitive.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-type-case-insensitive.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-type-case-insensitive.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -26,12 +26,12 @@
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script type=&quot;MoDuLe&quot;&gt;
</span><del>-import Cocoa from &quot;./script-tests/module-inline-simple.js&quot;;
</del><ins>+import Cocoa from &quot;./resources/module-inline-simple.js&quot;;
</ins><span class="cx"> window.resolve1();
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script type=&quot;MODULE&quot;&gt;
</span><del>-import Cocoa from &quot;./script-tests/module-inline-simple.js&quot;;
</del><ins>+import Cocoa from &quot;./resources/module-inline-simple.js&quot;;
</ins><span class="cx"> window.resolve2();
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesmodulewillfirebeforeloadhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/module-will-fire-beforeload.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/module-will-fire-beforeload.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/module-will-fire-beforeload.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -11,6 +11,6 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script type=&quot;module&quot; onbeforeload=&quot;finishJSTest()&quot; src=&quot;script-tests/module-will-fire-beforeload.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script type=&quot;module&quot; onbeforeload=&quot;finishJSTest()&quot; src=&quot;resources/module-will-fire-beforeload.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> (function () {
</span><span class="cx">     var element = document.createElement('script');
</span><span class="cx">     element.noModule = true;
</span><del>-    element.src = './script-tests/error-classic-script.js';
</del><ins>+    element.src = './resources/error-classic-script.js';
</ins><span class="cx">     document.body.appendChild(element);
</span><span class="cx">     setTimeout(function () {
</span><span class="cx">         shouldBeFalse(`executed`);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlinehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script nomodule type=&quot;module&quot;&gt;
</span><del>-import Cocoa from &quot;./script-tests/module-inline-simple.js&quot;;
</del><ins>+import Cocoa from &quot;./resources/module-inline-simple.js&quot;;
</ins><span class="cx"> var cocoa = new Cocoa();
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;Module execution is confined in the module environment.&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -14,6 +14,6 @@
</span><span class="cx"> debug('Module is not executed yet.');
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script nomodule type=&quot;module&quot; src=&quot;./script-tests/module-src-simple.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script nomodule type=&quot;module&quot; src=&quot;./resources/module-src-simple.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> description('Test nomodule prevents execution of classic script.');
</span><span class="cx"> window.executed = false;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script nomodule src=&quot;./script-tests/module-src-simple.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script nomodule src=&quot;./resources/module-src-simple.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBeFalse(`executed`);
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulereflecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/nomodule-reflect.html (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-reflect.html        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/nomodule-reflect.html        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> window.jsTestIsAsync = true;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script id=&quot;target&quot; src=&quot;./script-tests/error-classic-script.js&quot; nomodule&gt;&lt;/script&gt;
</del><ins>+&lt;script id=&quot;target&quot; src=&quot;./resources/error-classic-script.js&quot; nomodule&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script id=&quot;target2&quot;&gt;
</span><span class="cx"> window.executed2 = true;
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourceserrorclassicscriptjsfromrev211277trunkLayoutTestsjsdommodulesscripttestserrorclassicscriptjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/js/dom/modules/resources/error-classic-script.js (from rev 211277, trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/error-classic-script.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/error-classic-script.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+window.executed = true;
+testFailed(&quot;error&quot;);
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesimportfromloadedclassicfinishjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic-finish.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic-finish.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic-finish.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug(&quot;import from loaded classic finish&quot;);
+window.imported = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesimportfromloadedclassicjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-classic.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug(&quot;import from loaded classic&quot;);
+import(&quot;./import-from-loaded-classic-finish.js&quot;).then(loaded);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesimportfromloadedmodulefinishjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module-finish.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module-finish.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module-finish.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug(&quot;import from loaded module finish&quot;);
+window.imported = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesimportfromloadedmodulejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/import-from-loaded-module.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug(&quot;import from loaded module&quot;);
+import(&quot;./import-from-loaded-module-finish.js&quot;).then(loaded);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesimportsrcsimplejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/import-src-simple.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/import-src-simple.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/import-src-simple.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+import Cocoa from &quot;./module-src-simple-cocoa.js&quot;;
+var cocoa = new Cocoa();
+
+debug(&quot;Module execution is confined in the module environment.&quot;);
+shouldBeEqualToString(&quot;typeof cocoa&quot;, &quot;undefined&quot;);
+
+window.exportedCocoa = cocoa;
+shouldBeEqualToString(&quot;typeof exportedCocoa&quot;, &quot;object&quot;);
+shouldBeEqualToString(&quot;exportedCocoa.taste()&quot;, &quot;nice&quot;);
+export let ok = cocoa;
+window.imported = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduledocumentwritesrcjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-document-write-src.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-document-write-src.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-document-write-src.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+document.write(&quot;TEST FAILED&quot;);
+finishJSTest();
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorthrowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug(&quot;Executing the dependent module&quot;);
+throw new Error(&quot;out&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionerrorinsidedependentmoduleshouldbepropagatedtoonerrorjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+import &quot;./module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js&quot;
+testFailed(&quot;executed&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixed2js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-2.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-2.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-2.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+shouldBe(&quot;count++&quot;, &quot;5&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedcappuccinojs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cappuccino.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cappuccino.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cappuccino.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+import &quot;./module-execution-order-mixed-matcha.js&quot;
+
+shouldBe(&quot;count++&quot;, &quot;2&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedcocoajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cocoa.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cocoa.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-cocoa.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+import &quot;./module-execution-order-mixed-matcha.js&quot;;
+
+shouldBe(&quot;count++&quot;, &quot;1&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedmatchajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-matcha.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-matcha.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-matcha.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+shouldBe(&quot;count++&quot;, &quot;0&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscripts2js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+shouldBe(&quot;count++&quot;, &quot;11&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptscappuccinojs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+import &quot;./module-execution-order-mixed-with-classic-scripts-matcha.js&quot;
+
+shouldBe(&quot;count++&quot;, &quot;8&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptscocoajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+import &quot;./module-execution-order-mixed-with-classic-scripts-matcha.js&quot;;
+
+shouldBe(&quot;count++&quot;, &quot;7&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptsmatchajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+shouldBe(&quot;count++&quot;, &quot;6&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedwithclassicscriptsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+import &quot;./module-execution-order-mixed-with-classic-scripts-cocoa.js&quot;
+import &quot;./module-execution-order-mixed-with-classic-scripts-cappuccino.js&quot;
+
+shouldBe(&quot;count++&quot;, &quot;9&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleexecutionordermixedjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-execution-order-mixed.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+import &quot;./module-execution-order-mixed-cocoa.js&quot;
+import &quot;./module-execution-order-mixed-cappuccino.js&quot;
+
+shouldBe(&quot;count++&quot;, &quot;3&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleinlinedynamicjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-inline-dynamic.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-inline-dynamic.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-inline-dynamic.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+export default class Cocoa {
+    taste() {
+        return &quot;awesome&quot;;
+    }
+};
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleinlinesimplejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-inline-simple.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-inline-simple.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-inline-simple.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+export default class Cocoa {
+    taste() {
+        return &quot;awesome&quot;;
+    }
+};
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleloadeventwithsrcjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-load-event-with-src.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-load-event-with-src.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-load-event-with-src.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug('Executing a module with src attribute.');
+window.moduleExecuted = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmoduleloadsamemodulefromdifferententrypointjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-load-same-module-from-different-entry-point.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-load-same-module-from-different-entry-point.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-load-same-module-from-different-entry-point.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+debug('Executing module-load-same-module-from-different-entry-point.js.');
+window.moduleExecutedCount++;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulenotfounderroreventwithsrcandimportjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+import &quot;./not-found.js&quot;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulesrccurrentscriptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-src-current-script.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-src-current-script.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-src-current-script.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+debug(&quot;Module execution is confined in the module environment.&quot;);
+shouldBe(&quot;document.currentScript&quot;, &quot;null&quot;);
+finishJSTest();
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulesrcdynamiccocoajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic-cocoa.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic-cocoa.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic-cocoa.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+class Cocoa {
+    taste() {
+        return &quot;nice&quot;;
+    }
+}
+
+export default Cocoa;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulesrcdynamicjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-src-dynamic.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+import Cocoa from &quot;./module-src-dynamic-cocoa.js&quot;;
+var cocoa = new Cocoa();
+
+debug(&quot;Module execution is confined in the module environment.&quot;);
+shouldBeEqualToString(&quot;typeof cocoa&quot;, &quot;undefined&quot;);
+
+window.exportedCocoa = cocoa;
+shouldBeEqualToString(&quot;typeof exportedCocoa&quot;, &quot;object&quot;);
+shouldBeEqualToString(&quot;exportedCocoa.taste()&quot;, &quot;nice&quot;);
+finishJSTest();
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulesrcsimplecocoajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-src-simple-cocoa.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-src-simple-cocoa.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-src-simple-cocoa.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+class Cocoa {
+    taste() {
+        return &quot;nice&quot;;
+    }
+}
+
+export default Cocoa;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulesrcsimplejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-src-simple.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-src-simple.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-src-simple.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+import Cocoa from &quot;./module-src-simple-cocoa.js&quot;;
+var cocoa = new Cocoa();
+
+debug(&quot;Module execution is confined in the module environment.&quot;);
+shouldBeEqualToString(&quot;typeof cocoa&quot;, &quot;undefined&quot;);
+
+window.exportedCocoa = cocoa;
+shouldBeEqualToString(&quot;typeof exportedCocoa&quot;, &quot;object&quot;);
+shouldBeEqualToString(&quot;exportedCocoa.taste()&quot;, &quot;nice&quot;);
+finishJSTest();
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesresourcesmodulewillfirebeforeloadjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/resources/module-will-fire-beforeload.js (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/resources/module-will-fire-beforeload.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/resources/module-will-fire-beforeload.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+testFailed(&quot;executed&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesscripttestserrorclassicscriptjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-window.executed = true;
-testFailed(&quot;error&quot;);
-
</del></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -1475,6 +1475,7 @@
</span><span class="cx">     dom/Range.cpp
</span><span class="cx">     dom/ScopedEventQueue.cpp
</span><span class="cx">     dom/ScriptElement.cpp
</span><ins>+    dom/ScriptElementCachedScriptFetcher.cpp
</ins><span class="cx">     dom/ScriptExecutionContext.cpp
</span><span class="cx">     dom/ScriptRunner.cpp
</span><span class="cx">     dom/ScriptableDocumentParser.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/ChangeLog        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -1,3 +1,91 @@
</span><ins>+2017-01-27  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Implement dynamic-import for WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=166926
+
+        Reviewed by Ryosuke Niwa.
+
+        This patch introduces browser side dynamic-import implementation.
+        The dynamic-import is new ES feature which is now stage 3.
+        The JSC shell already implements it.
+
+        The dynamic-import allows us to kick module loading in a dynamic manner.
+        For example, you can write,
+
+            await module = import(`${HOST}/hello.js`);
+
+        The dynamic `import` operator (this is not a function) returns a promise with
+        module namespace object if the module loading succeeds. Otherwise, it returns
+        a rejected promise.
+
+        And importantly, this feature allows us to kick module loading from classic script.
+        Previously, module loading can be only used from &lt;script type=&quot;module&quot;&gt; tag. And
+        all the module loading is done statically.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/CachedModuleScriptLoader.cpp:
+        (WebCore::CachedModuleScriptLoader::load):
+        * bindings/js/CachedScriptFetcher.cpp:
+        (WebCore::CachedScriptFetcher::create):
+        (WebCore::CachedScriptFetcher::requestModuleScript):
+        requestModuleScript function is used only when loading a new module script.
+        So, LoadableClassicScript should use requestScriptWithCache to load itself.
+        We pass String() for cross origin mode for null cross origin attribute as
+        specified.
+
+        (WebCore::CachedScriptFetcher::requestScriptWithCache):
+        * bindings/js/CachedScriptFetcher.h:
+        (WebCore::CachedScriptFetcher::CachedScriptFetcher):
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
+        * bindings/js/JSDOMWindowBase.h:
+        * bindings/js/JSLazyEventListener.cpp:
+        (WebCore::JSLazyEventListener::initializeJSFunction):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::executeScript):
+        * bindings/js/ScriptModuleLoader.cpp:
+        (WebCore::resolveModuleSpecifier):
+        Extract the part of resolving module specifier to a static function to use
+        it in ScriptModuleLoader::resolve and ScriptModuleLoader::importModule.
+
+        (WebCore::ScriptModuleLoader::resolve):
+        (WebCore::rejectPromise):
+        (WebCore::ScriptModuleLoader::importModule):
+        New hook moduleLoaderImportModule is implemented. This hook is called when
+        `import` operator is used. This hook is responsible to
+            1. resolve the module name to obtain module specifier. (like, resolve the
+                relative URL to get absolute URL.)
+            2. kick module loading with the resolved specifier.
+        When resolving the module name, the referrer information is needed.
+        For example, &quot;./script.js&quot; will be resolved to &quot;http://example.com/script.js&quot; if
+        the referrer module specifier is &quot;http://example.com/&quot;.
+        If `import(&quot;./script.js&quot;)` is executed in the classic script
+        src=&quot;http://example.com/test.js&quot;, it starts loading &quot;http://example.com/script.js&quot;.
+        So the information of the caller of `import` operator is necessary here.
+        This appropriate referrer is propagated by SourceOrigin.
+
+        * bindings/js/ScriptModuleLoader.h:
+        * dom/InlineClassicScript.h:
+        * dom/LoadableClassicScript.cpp:
+        (WebCore::LoadableClassicScript::load):
+        * dom/LoadableClassicScript.h:
+        * dom/LoadableModuleScript.h:
+        * dom/LoadableScript.h:
+        (WebCore::LoadableScript::LoadableScript):
+        (WebCore::LoadableScript::isClassicScript): Deleted.
+        (WebCore::LoadableScript::isModuleScript): Deleted.
+        * dom/ScriptElement.h:
+        * dom/ScriptElementCachedScriptFetcher.cpp: Copied from Source/WebCore/dom/InlineClassicScript.h.
+        (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript):
+        This requestModuleScript will be used when the script tag (or modules imported from the script tag) uses `import` operator.
+        In classic scripts, `crossorigin` mode always becomes &quot;omit&quot; while module scripts
+        propagate the original `crossorigin` value.
+
+        * dom/ScriptElementCachedScriptFetcher.h: Copied from Source/WebCore/bindings/js/CachedScriptFetcher.h.
+        (WebCore::ScriptElementCachedScriptFetcher::crossOriginMode):
+        (WebCore::ScriptElementCachedScriptFetcher::ScriptElementCachedScriptFetcher):
+
</ins><span class="cx"> 2017-01-26  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert r210474 it is no longer needed
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -6327,6 +6327,8 @@
</span><span class="cx">                 E3B2F0F01D7F4CB500B0C9D1 /* LoadableClassicScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E41D7F35EC00B0C9D1 /* LoadableClassicScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E3B7C0631DC34160001FB0B8 /* JSDocumentDOMJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B7C0621DC3415A001FB0B8 /* JSDocumentDOMJIT.cpp */; };
</span><span class="cx">                 E3C99A091DC3D41C00794AD3 /* DOMJITCheckDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C99A081DC3D41700794AD3 /* DOMJITCheckDOM.h */; };
</span><ins>+                E3E4E2A71E3B17100023BB8A /* ScriptElementCachedScriptFetcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3E4E2A51E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.cpp */; };
+                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 E3FA38641D71812D00AA5950 /* PendingScriptClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3FA38611D716E7600AA5950 /* PendingScriptClient.h */; };
</span><span class="cx">                 E401C27517CE53EC00C41A35 /* ElementIteratorAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = E401C27417CE53EC00C41A35 /* ElementIteratorAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E401E0A41C3C0B8300F34D10 /* StyleChange.h in Headers */ = {isa = PBXBuildFile; fileRef = E401E0A31C3C0B8300F34D10 /* StyleChange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -14378,6 +14380,8 @@
</span><span class="cx">                 E3B7C0621DC3415A001FB0B8 /* JSDocumentDOMJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentDOMJIT.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E3C99A081DC3D41700794AD3 /* DOMJITCheckDOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITCheckDOM.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E3D049931DADC04500718F3C /* NodeConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeConstants.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                E3E4E2A51E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptElementCachedScriptFetcher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptElementCachedScriptFetcher.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 E3FA38611D716E7600AA5950 /* PendingScriptClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PendingScriptClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E401C27417CE53EC00C41A35 /* ElementIteratorAssertions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementIteratorAssertions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E401E0A31C3C0B8300F34D10 /* StyleChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleChange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -24411,6 +24415,8 @@
</span><span class="cx">                                 4998AED013FB224D0090B1AA /* ScriptedAnimationController.h */,
</span><span class="cx">                                 08A484750E5272C500C3FE76 /* ScriptElement.cpp */,
</span><span class="cx">                                 08A484760E5272C500C3FE76 /* ScriptElement.h */,
</span><ins>+                                E3E4E2A51E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.cpp */,
+                                E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */,
</ins><span class="cx">                                 E11C9DAF0EB3699500E409DB /* ScriptExecutionContext.cpp */,
</span><span class="cx">                                 E11C9D9A0EB3681200E409DB /* ScriptExecutionContext.h */,
</span><span class="cx">                                 8A413ADF1207BBA50082016E /* ScriptRunner.cpp */,
</span><span class="lines">@@ -25863,6 +25869,7 @@
</span><span class="cx">                                 26EA89A71B4F2B75008C5FD2 /* HashableActionList.h in Headers */,
</span><span class="cx">                                 8482B7461198C35400BFB005 /* HashChangeEvent.h in Headers */,
</span><span class="cx">                                 A8748BE012CBF2DC001FBA41 /* HashTools.h in Headers */,
</span><ins>+                                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */,
</ins><span class="cx">                                 F55B3DC01251F12D003EF269 /* HiddenInputType.h in Headers */,
</span><span class="cx">                                 515BE19C1D54F6C100DD7C68 /* HIDGamepad.h in Headers */,
</span><span class="cx">                                 515BE19E1D54F6C100DD7C68 /* HIDGamepadProvider.h in Headers */,
</span><span class="lines">@@ -31847,6 +31854,7 @@
</span><span class="cx">                                 29A8124A0FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.mm in Sources */,
</span><span class="cx">                                 AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
</span><span class="cx">                                 AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
</span><ins>+                                E3E4E2A71E3B17100023BB8A /* ScriptElementCachedScriptFetcher.cpp in Sources */,
</ins><span class="cx">                                 2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */,
</span><span class="cx">                                 120DE3ED1C86CA3E00B6D4DD /* WebAnimation.cpp in Sources */,
</span><span class="cx">                                 07D637411BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCachedModuleScriptLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> bool CachedModuleScriptLoader::load(Document&amp; document, const URL&amp; sourceURL)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_cachedScript);
</span><del>-    m_cachedScript = m_scriptFetcher-&gt;requestScriptWithCache(document, sourceURL);
</del><ins>+    m_cachedScript = m_scriptFetcher-&gt;requestModuleScript(document, sourceURL);
</ins><span class="cx">     if (!m_cachedScript)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCachedScriptFetchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CachedScriptFetcher.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CachedScriptFetcher.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/CachedScriptFetcher.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -34,8 +34,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-CachedResourceHandle&lt;CachedScript&gt; CachedScriptFetcher::requestScriptWithCache(Document&amp; document, const URL&amp; sourceURL) const
</del><ins>+Ref&lt;CachedScriptFetcher&gt; CachedScriptFetcher::create(const String&amp; charset)
</ins><span class="cx"> {
</span><ins>+    return adoptRef(*new CachedScriptFetcher(charset));
+}
+
+CachedResourceHandle&lt;CachedScript&gt; CachedScriptFetcher::requestModuleScript(Document&amp; document, const URL&amp; sourceURL) const
+{
+    return requestScriptWithCache(document, sourceURL, String());
+}
+
+CachedResourceHandle&lt;CachedScript&gt; CachedScriptFetcher::requestScriptWithCache(Document&amp; document, const URL&amp; sourceURL, const String&amp; crossOriginMode) const
+{
</ins><span class="cx">     auto* settings = document.settings();
</span><span class="cx">     if (settings &amp;&amp; !settings-&gt;isScriptEnabled())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -46,11 +56,12 @@
</span><span class="cx">     options.contentSecurityPolicyImposition = hasKnownNonce ? ContentSecurityPolicyImposition::SkipPolicyCheck : ContentSecurityPolicyImposition::DoPolicyCheck;
</span><span class="cx"> 
</span><span class="cx">     CachedResourceRequest request(ResourceRequest(sourceURL), options);
</span><del>-    request.setAsPotentiallyCrossOrigin(m_crossOriginMode, document);
</del><ins>+    request.setAsPotentiallyCrossOrigin(crossOriginMode, document);
</ins><span class="cx">     request.upgradeInsecureRequestIfNeeded(document);
</span><span class="cx"> 
</span><span class="cx">     request.setCharset(m_charset);
</span><del>-    request.setInitiator(m_initiatorName);
</del><ins>+    if (!m_initiatorName.isNull())
+        request.setInitiator(m_initiatorName);
</ins><span class="cx"> 
</span><span class="cx">     return document.cachedResourceLoader().requestScript(WTFMove(request));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCachedScriptFetcherh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CachedScriptFetcher.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CachedScriptFetcher.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/CachedScriptFetcher.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -37,12 +37,13 @@
</span><span class="cx"> 
</span><span class="cx"> class CachedScriptFetcher : public JSC::ScriptFetcher {
</span><span class="cx"> public:
</span><del>-    CachedResourceHandle&lt;CachedScript&gt; requestScriptWithCache(Document&amp;, const URL&amp; sourceURL) const;
</del><ins>+    virtual CachedResourceHandle&lt;CachedScript&gt; requestModuleScript(Document&amp;, const URL&amp; sourceURL) const;
</ins><span class="cx"> 
</span><ins>+    static Ref&lt;CachedScriptFetcher&gt; create(const String&amp; charset);
+
</ins><span class="cx"> protected:
</span><del>-    CachedScriptFetcher(const String&amp; nonce, const String&amp; crossOriginMode, const String&amp; charset, const AtomicString&amp; initiatorName, bool isInUserAgentShadowTree)
</del><ins>+    CachedScriptFetcher(const String&amp; nonce, const String&amp; charset, const AtomicString&amp; initiatorName, bool isInUserAgentShadowTree)
</ins><span class="cx">         : m_nonce(nonce)
</span><del>-        , m_crossOriginMode(crossOriginMode)
</del><span class="cx">         , m_charset(charset)
</span><span class="cx">         , m_initiatorName(initiatorName)
</span><span class="cx">         , m_isInUserAgentShadowTree(isInUserAgentShadowTree)
</span><span class="lines">@@ -49,9 +50,15 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    CachedScriptFetcher(const String&amp; charset)
+        : m_charset(charset)
+    {
+    }
+
+    CachedResourceHandle&lt;CachedScript&gt; requestScriptWithCache(Document&amp;, const URL&amp; sourceURL, const String&amp; crossOriginMode) const;
+
</ins><span class="cx"> private:
</span><span class="cx">     String m_nonce;
</span><del>-    String m_crossOriginMode;
</del><span class="cx">     String m_charset;
</span><span class="cx">     AtomicString m_initiatorName;
</span><span class="cx">     bool m_isInUserAgentShadowTree { false };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     &amp;javaScriptRuntimeFlags,
</span><span class="cx">     &amp;queueTaskToEventLoop,
</span><span class="cx">     &amp;shouldInterruptScriptBeforeTimeout,
</span><del>-    nullptr,
</del><ins>+    &amp;moduleLoaderImportModule,
</ins><span class="cx">     &amp;moduleLoaderResolve,
</span><span class="cx">     &amp;moduleLoaderFetch,
</span><span class="cx">     nullptr,
</span><span class="lines">@@ -332,4 +332,13 @@
</span><span class="cx">     return JSC::jsUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSInternalPromise* JSDOMWindowBase::moduleLoaderImportModule(JSC::JSGlobalObject* globalObject, JSC::ExecState* exec, JSC::JSModuleLoader* moduleLoader, JSC::JSString* moduleName, const JSC::SourceOrigin&amp; sourceOrigin)
+{
+    JSDOMWindowBase* thisObject = JSC::jsCast&lt;JSDOMWindowBase*&gt;(globalObject);
+    if (RefPtr&lt;Document&gt; document = thisObject-&gt;wrapped().document())
+        return document-&gt;moduleLoader()-&gt;importModule(globalObject, exec, moduleLoader, moduleName, sourceOrigin);
+    JSC::JSInternalPromiseDeferred* deferred = JSC::JSInternalPromiseDeferred::create(exec, globalObject);
+    return deferred-&gt;reject(exec, jsUndefined());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx">         static JSC::JSInternalPromise* moduleLoaderResolve(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
</span><span class="cx">         static JSC::JSInternalPromise* moduleLoaderFetch(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue);
</span><span class="cx">         static JSC::JSValue moduleLoaderEvaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
</span><ins>+        static JSC::JSInternalPromise* moduleLoaderImportModule(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSString*, const JSC::SourceOrigin&amp;);
</ins><span class="cx"> 
</span><span class="cx">         RefPtr&lt;DOMWindow&gt; m_wrapped;
</span><span class="cx">         JSDOMWindowShell* m_shell;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSLazyEventListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSLazyEventListener.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;CachedScriptFetcher.h&quot;
</ins><span class="cx"> #include &quot;ContentSecurityPolicy.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;JSNode.h&quot;
</span><span class="lines">@@ -112,7 +113,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSObject* jsFunction = constructFunctionSkippingEvalEnabledCheck(
</span><span class="cx">         exec, exec-&gt;lexicalGlobalObject(), args, Identifier::fromString(exec, m_functionName),
</span><del>-        SourceOrigin { m_sourceURL }, m_sourceURL, m_sourcePosition, overrideLineNumber);
</del><ins>+        SourceOrigin { m_sourceURL, CachedScriptFetcher::create(document.charset()) }, m_sourceURL, m_sourcePosition, overrideLineNumber);
</ins><span class="cx"> 
</span><span class="cx">     if (UNLIKELY(scope.exception())) {
</span><span class="cx">         reportCurrentException(exec);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -675,7 +675,7 @@
</span><span class="cx"> JSValue ScriptController::executeScript(const String&amp; script, bool forceUserGesture, ExceptionDetails* exceptionDetails)
</span><span class="cx"> {
</span><span class="cx">     UserGestureIndicator gestureIndicator(forceUserGesture ? std::optional&lt;ProcessingUserGestureState&gt;(ProcessingUserGesture) : std::nullopt);
</span><del>-    return executeScript(ScriptSourceCode(script, m_frame.document()-&gt;url()), exceptionDetails);
</del><ins>+    return executeScript(ScriptSourceCode(script, m_frame.document()-&gt;url(), TextPosition(), JSC::SourceProviderSourceType::Program, CachedScriptFetcher::create(m_frame.document()-&gt;charset())), exceptionDetails);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue ScriptController::executeScript(const ScriptSourceCode&amp; sourceCode, ExceptionDetails* exceptionDetails)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptModuleLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CachedModuleScriptLoader.h&quot;
</span><span class="cx"> #include &quot;CachedScript.h&quot;
</span><ins>+#include &quot;CachedScriptFetcher.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="lines">@@ -35,6 +36,7 @@
</span><span class="cx"> #include &quot;MIMETypeRegistry.h&quot;
</span><span class="cx"> #include &quot;ScriptController.h&quot;
</span><span class="cx"> #include &quot;ScriptSourceCode.h&quot;
</span><ins>+#include &lt;runtime/Completion.h&gt;
</ins><span class="cx"> #include &lt;runtime/JSInternalPromise.h&gt;
</span><span class="cx"> #include &lt;runtime/JSInternalPromiseDeferred.h&gt;
</span><span class="cx"> #include &lt;runtime/JSModuleRecord.h&gt;
</span><span class="lines">@@ -61,6 +63,23 @@
</span><span class="cx">     return importerModuleKey.isSymbol() || importerModuleKey.isUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static Expected&lt;URL, ASCIILiteral&gt; resolveModuleSpecifier(Document&amp; document, const String&amp; specifier, const URL&amp; baseURL)
+{
+    // https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier
+
+    URL absoluteURL(URL(), specifier);
+    if (absoluteURL.isValid())
+        return absoluteURL;
+
+    if (!specifier.startsWith('/') &amp;&amp; !specifier.startsWith(&quot;./&quot;) &amp;&amp; !specifier.startsWith(&quot;../&quot;))
+        return makeUnexpected(ASCIILiteral(&quot;Module specifier does not start with \&quot;/\&quot;, \&quot;./\&quot;, or \&quot;../\&quot;.&quot;));
+
+    auto result = document.completeURL(specifier, baseURL);
+    if (!result.isValid())
+        return makeUnexpected(ASCIILiteral(&quot;Module name does not resolve to a valid URL.&quot;));
+    return result;
+}
+
</ins><span class="cx"> JSC::JSInternalPromise* ScriptModuleLoader::resolve(JSC::JSGlobalObject* jsGlobalObject, JSC::ExecState* exec, JSC::JSModuleLoader*, JSC::JSValue moduleNameValue, JSC::JSValue importerModuleKey, JSC::JSValue)
</span><span class="cx"> {
</span><span class="cx">     auto&amp; globalObject = *JSC::jsCast&lt;JSDOMGlobalObject*&gt;(jsGlobalObject);
</span><span class="lines">@@ -75,60 +94,32 @@
</span><span class="cx">         return jsPromise.promise();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier
-
</del><span class="cx">     if (!moduleNameValue.isString()) {
</span><del>-        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Module specifier is not Symbol or String.&quot;));
</del><ins>+        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Importer module key is not a Symbol or a String.&quot;));
</ins><span class="cx">         return jsPromise.promise();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     String specifier = asString(moduleNameValue)-&gt;value(exec);
</span><del>-
-    // 1. Apply the URL parser to specifier. If the result is not failure, return the result.
-    URL absoluteURL(URL(), specifier);
-    if (absoluteURL.isValid()) {
-        promise-&gt;resolve&lt;IDLDOMString&gt;(absoluteURL.string());
-        return jsPromise.promise();
-    }
-
-    // 2. If specifier does not start with the character U+002F SOLIDUS (/), the two-character sequence U+002E FULL STOP, U+002F SOLIDUS (./),
-    //    or the three-character sequence U+002E FULL STOP, U+002E FULL STOP, U+002F SOLIDUS (../), return failure and abort these steps.
-    if (!specifier.startsWith('/') &amp;&amp; !specifier.startsWith(&quot;./&quot;) &amp;&amp; !specifier.startsWith(&quot;../&quot;)) {
-        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Module specifier does not start with \&quot;/\&quot;, \&quot;./\&quot;, or \&quot;../\&quot;.&quot;));
-        return jsPromise.promise();
-    }
-
-    // 3. Return the result of applying the URL parser to specifier with script's base URL as the base URL.
-
-    URL completedURL;
-
</del><ins>+    URL baseURL;
</ins><span class="cx">     if (isRootModule(importerModuleKey))
</span><del>-        completedURL = m_document.completeURL(specifier);
-    else if (importerModuleKey.isString()) {
</del><ins>+        baseURL = m_document.baseURL();
+    else {
+        ASSERT(importerModuleKey.isString());
</ins><span class="cx">         URL importerModuleRequestURL(URL(), asString(importerModuleKey)-&gt;value(exec));
</span><del>-        if (!importerModuleRequestURL.isValid()) {
-            promise-&gt;reject(TypeError, ASCIILiteral(&quot;Importer module key is an invalid URL.&quot;));
-            return jsPromise.promise();
-        }
</del><ins>+        ASSERT_WITH_MESSAGE(importerModuleRequestURL.isValid(), &quot;Invalid module referrer never starts importing dependent modules.&quot;);
</ins><span class="cx"> 
</span><del>-        URL importerModuleResponseURL = m_requestURLToResponseURLMap.get(importerModuleRequestURL);
-        if (!importerModuleResponseURL.isValid()) {
-            promise-&gt;reject(TypeError, ASCIILiteral(&quot;Importer module has an invalid response URL.&quot;));
-            return jsPromise.promise();
-        }
-
-        completedURL = m_document.completeURL(specifier, importerModuleResponseURL);
-    } else {
-        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Importer module key is not Symbol or String.&quot;));
-        return jsPromise.promise();
</del><ins>+        auto iterator = m_requestURLToResponseURLMap.find(importerModuleRequestURL);
+        ASSERT_WITH_MESSAGE(iterator != m_requestURLToResponseURLMap.end(), &quot;Module referrer must register itself to the map before starting importing dependent modules.&quot;);
+        baseURL = iterator-&gt;value;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!completedURL.isValid()) {
-        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Module name constructs an invalid URL.&quot;));
</del><ins>+    auto result = resolveModuleSpecifier(m_document, specifier, baseURL);
+    if (!result) {
+        promise-&gt;reject(TypeError, result.error());
</ins><span class="cx">         return jsPromise.promise();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    promise-&gt;resolve&lt;IDLDOMString&gt;(completedURL.string());
</del><ins>+    promise-&gt;resolve&lt;IDLDOMString&gt;(result-&gt;string());
</ins><span class="cx">     return jsPromise.promise();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -199,6 +190,38 @@
</span><span class="cx">     return JSC::jsUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSC::JSInternalPromise* rejectPromise(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, ExceptionCode ec, ASCIILiteral message)
+{
+    auto&amp; jsPromise = *JSC::JSInternalPromiseDeferred::create(&amp;state, &amp;globalObject);
+    auto deferred = DeferredPromise::create(globalObject, jsPromise);
+    deferred-&gt;reject(ec, WTFMove(message));
+    return jsPromise.promise();
+}
+
+JSC::JSInternalPromise* ScriptModuleLoader::importModule(JSC::JSGlobalObject* jsGlobalObject, JSC::ExecState* exec, JSC::JSModuleLoader*, JSC::JSString* moduleName, const JSC::SourceOrigin&amp; sourceOrigin)
+{
+    auto&amp; state = *exec;
+    JSC::VM&amp; vm = exec-&gt;vm();
+    auto&amp; globalObject = *JSC::jsCast&lt;JSDOMGlobalObject*&gt;(jsGlobalObject);
+
+    // FIXME: setTimeout and setInterval with &quot;string()&quot; should propagate SourceOrigin.
+    // https://webkit.org/b/167097
+    ASSERT_WITH_MESSAGE(!sourceOrigin.isNull(), &quot;If SourceOrigin is null, this function is not invoked.&quot;);
+    if (!sourceOrigin.fetcher())
+        return rejectPromise(state, globalObject, TypeError, ASCIILiteral(&quot;Could not use import operator in this context.&quot;));
+
+    URL baseURL(URL(), sourceOrigin.string());
+    if (!baseURL.isValid())
+        return rejectPromise(state, globalObject, TypeError, ASCIILiteral(&quot;Importer module key is not Symbol or String.&quot;));
+
+    auto specifier = moduleName-&gt;value(exec);
+    auto result = resolveModuleSpecifier(m_document, specifier, baseURL);
+    if (!result)
+        return rejectPromise(state, globalObject, TypeError, result.error());
+
+    return JSC::importModule(exec, JSC::Identifier::fromString(&amp;vm, result-&gt;string()), JSC::JSScriptFetcher::create(vm, sourceOrigin.fetcher() ));
+}
+
</ins><span class="cx"> void ScriptModuleLoader::notifyFinished(CachedModuleScriptLoader&amp; loader, RefPtr&lt;DeferredPromise&gt; promise)
</span><span class="cx"> {
</span><span class="cx">     // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptModuleLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptModuleLoader.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptModuleLoader.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/bindings/js/ScriptModuleLoader.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> class JSGlobalObject;
</span><span class="cx"> class JSInternalPromise;
</span><span class="cx"> class JSModuleLoader;
</span><ins>+class SourceOrigin;
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -57,6 +58,7 @@
</span><span class="cx">     JSC::JSInternalPromise* resolve(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue moduleName, JSC::JSValue importerModuleKey, JSC::JSValue scriptFetcher);
</span><span class="cx">     JSC::JSInternalPromise* fetch(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue moduleKey, JSC::JSValue scriptFetcher);
</span><span class="cx">     JSC::JSValue evaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue moduleKey, JSC::JSValue moduleRecord, JSC::JSValue scriptFetcher);
</span><ins>+    JSC::JSInternalPromise* importModule(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSString*, const JSC::SourceOrigin&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void notifyFinished(CachedModuleScriptLoader&amp;, RefPtr&lt;DeferredPromise&gt;) final;
</span></span></pre></div>
<a id="trunkSourceWebCoredomInlineClassicScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InlineClassicScript.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InlineClassicScript.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/InlineClassicScript.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -25,19 +25,22 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;CachedScriptFetcher.h&quot;
</del><ins>+#include &quot;ScriptElementCachedScriptFetcher.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class ScriptElement;
</span><span class="cx"> 
</span><del>-class InlineClassicScript final : public CachedScriptFetcher {
</del><ins>+class InlineClassicScript final : public ScriptElementCachedScriptFetcher {
</ins><span class="cx"> public:
</span><span class="cx">     static Ref&lt;InlineClassicScript&gt; create(ScriptElement&amp;);
</span><span class="cx"> 
</span><ins>+    bool isClassicScript() const final { return true; }
+    bool isModuleScript() const final { return false; }
+
</ins><span class="cx"> private:
</span><span class="cx">     InlineClassicScript(const String&amp; nonce, const String&amp; crossOriginMode, const String&amp; charset, const AtomicString&amp; initiatorName, bool isInUserAgentShadowTree)
</span><del>-        : CachedScriptFetcher(nonce, crossOriginMode, charset, initiatorName, isInUserAgentShadowTree)
</del><ins>+        : ScriptElementCachedScriptFetcher(nonce, crossOriginMode, charset, initiatorName, isInUserAgentShadowTree)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomLoadableClassicScriptcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LoadableClassicScript.cpp (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LoadableClassicScript.cpp        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/LoadableClassicScript.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> bool LoadableClassicScript::load(Document&amp; document, const URL&amp; sourceURL)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_cachedScript);
</span><del>-    m_cachedScript = requestScriptWithCache(document, sourceURL);
</del><ins>+    m_cachedScript = requestScriptWithCache(document, sourceURL, crossOriginMode());
</ins><span class="cx">     if (!m_cachedScript)
</span><span class="cx">         return false;
</span><span class="cx">     m_cachedScript-&gt;addClient(*this);
</span></span></pre></div>
<a id="trunkSourceWebCoredomLoadableClassicScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LoadableClassicScript.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LoadableClassicScript.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/LoadableClassicScript.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -47,7 +47,9 @@
</span><span class="cx">     bool wasCanceled() const final;
</span><span class="cx"> 
</span><span class="cx">     CachedScript&amp; cachedScript() { return *m_cachedScript; }
</span><ins>+
</ins><span class="cx">     bool isClassicScript() const final { return true; }
</span><ins>+    bool isModuleScript() const final { return false; }
</ins><span class="cx"> 
</span><span class="cx">     void execute(ScriptElement&amp;) final;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomLoadableModuleScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LoadableModuleScript.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LoadableModuleScript.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/LoadableModuleScript.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx">     bool wasCanceled() const final;
</span><span class="cx"> 
</span><span class="cx">     CachedModuleScript&amp; moduleScript() { return m_moduleScript.get(); }
</span><ins>+
+    bool isClassicScript() const final { return false; }
</ins><span class="cx">     bool isModuleScript() const final { return true; }
</span><span class="cx"> 
</span><span class="cx">     void execute(ScriptElement&amp;) final;
</span></span></pre></div>
<a id="trunkSourceWebCoredomLoadableScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LoadableScript.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LoadableScript.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/LoadableScript.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;CachedScriptFetcher.h&quot;
</del><ins>+#include &quot;ScriptElementCachedScriptFetcher.h&quot;
</ins><span class="cx"> #include &lt;runtime/ConsoleTypes.h&gt;
</span><span class="cx"> #include &lt;wtf/HashCountedSet.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> class LoadableScriptClient;
</span><span class="cx"> class ScriptElement;
</span><span class="cx"> 
</span><del>-class LoadableScript : public CachedScriptFetcher {
</del><ins>+class LoadableScript : public ScriptElementCachedScriptFetcher {
</ins><span class="cx"> public:
</span><span class="cx">     enum class ErrorType {
</span><span class="cx">         CachedScript,
</span><span class="lines">@@ -66,12 +66,9 @@
</span><span class="cx">     void addClient(LoadableScriptClient&amp;);
</span><span class="cx">     void removeClient(LoadableScriptClient&amp;);
</span><span class="cx"> 
</span><del>-    virtual bool isClassicScript() const { return false; }
-    virtual bool isModuleScript() const { return false; }
-
</del><span class="cx"> protected:
</span><span class="cx">     LoadableScript(const String&amp; nonce, const String&amp; crossOriginMode, const String&amp; charset, const AtomicString&amp; initiatorName, bool isInUserAgentShadowTree)
</span><del>-        : CachedScriptFetcher(nonce, crossOriginMode, charset, initiatorName, isInUserAgentShadowTree)
</del><ins>+        : ScriptElementCachedScriptFetcher(nonce, crossOriginMode, charset, initiatorName, isInUserAgentShadowTree)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.h (211279 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.h        2017-01-27 09:19:06 UTC (rev 211279)
+++ trunk/Source/WebCore/dom/ScriptElement.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -95,8 +95,6 @@
</span><span class="cx">     bool ignoresLoadRequest() const;
</span><span class="cx">     bool isScriptForEventSupported() const;
</span><span class="cx"> 
</span><del>-    CachedResourceHandle&lt;CachedScript&gt; requestScriptWithCache(const URL&amp;, const String&amp; nonceAttribute, const String&amp; crossoriginAttribute);
-
</del><span class="cx">     bool requestClassicScript(const String&amp; sourceURL);
</span><span class="cx">     bool requestModuleScript(const TextPosition&amp; scriptStartPosition);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementCachedScriptFetchercppfromrev211277trunkSourceWebCoredomInlineClassicScripth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp (from rev 211277, trunk/Source/WebCore/dom/InlineClassicScript.h) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp                                (rev 0)
+++ trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ScriptElementCachedScriptFetcher.h&quot;
+
+#include &quot;Element.h&quot;
+#include &quot;ScriptElement.h&quot;
+
+namespace WebCore {
+
+CachedResourceHandle&lt;CachedScript&gt; ScriptElementCachedScriptFetcher::requestModuleScript(Document&amp; document, const URL&amp; sourceURL) const
+{
+    // https://github.com/tc39/proposal-dynamic-import/blob/master/HTML Integration.md
+    // If the fetcher is not module script, credential mode is always &quot;omit&quot;.
+
+    return requestScriptWithCache(document, sourceURL, isClassicScript() ? ASCIILiteral(&quot;omit&quot;) : m_crossOriginMode);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementCachedScriptFetcherhfromrev211277trunkSourceWebCorebindingsjsCachedScriptFetcherh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.h (from rev 211277, trunk/Source/WebCore/bindings/js/CachedScriptFetcher.h) (0 => 211280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.h                                (rev 0)
+++ trunk/Source/WebCore/dom/ScriptElementCachedScriptFetcher.h        2017-01-27 10:49:23 UTC (rev 211280)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;CachedScriptFetcher.h&quot;
+
+namespace WebCore {
+
+class ScriptElementCachedScriptFetcher : public CachedScriptFetcher {
+public:
+    virtual CachedResourceHandle&lt;CachedScript&gt; requestModuleScript(Document&amp;, const URL&amp; sourceURL) const;
+
+    virtual bool isClassicScript() const = 0;
+    virtual bool isModuleScript() const = 0;
+
+    const String&amp; crossOriginMode() const { return m_crossOriginMode; }
+
+protected:
+    ScriptElementCachedScriptFetcher(const String&amp; nonce, const String&amp; crossOriginMode, const String&amp; charset, const AtomicString&amp; initiatorName, bool isInUserAgentShadowTree)
+        : CachedScriptFetcher(nonce, charset, initiatorName, isInUserAgentShadowTree)
+        , m_crossOriginMode(crossOriginMode)
+    {
+    }
+
+private:
+    String m_crossOriginMode;
+};
+
+} // namespace WebCore
</ins></span></pre>
</div>
</div>

</body>
</html>