• Hiroki Nakagawa's avatar
    ES6 Modules: Fix wrong test expectations in ModuleScriptLoaderTest · 16b181b3
    Hiroki Nakagawa authored
    Before this CL, some tests in ModuleScriptLoaderTest have wrong test
    expectations and test helpers have wrong implementation as follows:
    
    1) Dummy Modulator doesn't have a valid SecurityOrigin, so the CORS handling
       fails.
    2) Mocked ResourceResponse doesn't have a Content-Type header, so a generated
       ScriptResource doesn't have a valid MIME type (ScriptResource respects the
       header instead of ResourceResponse::MimeType()).
    
    This CL fixes them and corrects the test expectations.
    
    In addition, this CL...
    
    3) replaces NullURL() on the KURL constructor calls with kParsedURLString
       because they generate KURL instances from URL strings.
    4) makes TouchActionTests specify the MIME types. Without this change, these
       tests set the Content-Type header to the default MIME type "text/html" and
       start to fail.
    
    Bug: n/a
    Change-Id: Ifffa734dcb4e44a670172f27c30efcdcc075e5be
    Reviewed-on: https://chromium-review.googlesource.com/627523
    Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
    Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
    Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#496608}
    16b181b3
URLTestHelpers.cpp 4.03 KB