Skip to content

test, url: check the origin of the blob URLs#11426

Closed
watilde wants to merge 1 commit intonodejs:masterfrom
watilde:test-originFor
Closed

test, url: check the origin of the blob URLs#11426
watilde wants to merge 1 commit intonodejs:masterfrom
watilde:test-originFor

Conversation

@watilde
Copy link
Member

@watilde watilde commented Feb 16, 2017

In the getter of the origin in URL, the URL that has blob protocol will be parsed in a function called "originFor". Add test cases to the url-tests-additional fixture to test that.

This test increases the coverage of internal/url.js:

The following lines will be covered:

  • node/lib/internal/url.js

    Lines 1064 to 1073 in a196895

    case 'blob:':
    if (url[context].path && url[context].path.length > 0) {
    try {
    return (new URL(url[context].path[0])).origin;
    } catch (err) {
    // fall through... do nothing
    }
    }
    origin = new OpaqueOrigin();
    break;
Checklist
  • make -j4 test passes
  • tests are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test, url

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants