chromium/third_party/blink/web_tests/http/tests/inspector-protocol/preload/preloading-attempt-sources-updated-expected.txt


Running test: basicTest
Tests that Preload.preloadingAttemptSourcesUpdated is dispatched.
Preload attempts: [
    [0] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/page.html
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
        ]
    }
    [1] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/subresource.js
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
        ]
    }
]

Running test: multipleRuleSetsWithDuplicates
Tests that Preload.preloadingAttemptSourcesUpdated groups duplicates correctly.
Preload attempts: [
    [0] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/one.html
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
            [1] : <rule-set-2>
        ]
    }
    [1] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/three.html
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
    [2] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/two.html
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
        ]
    }
    [3] : {
        key : {
            action : Prerender
            loaderId : <string>
            url : http://127.0.0.1:8000/two.html
        }
        nodeIds : [
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
]

Running test: documentRules
Tests that Preload.preloadingAttemptSourcesUpdated is sent for document rule triggered attempts.
Preload attempts: [
    [0] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/star.html
        }
        nodeIds : [
            [0] : <link-4>
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
    [1] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/tau-ceti.html
        }
        nodeIds : [
            [0] : <link-5>
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
        ]
    }
    [2] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/time.html
        }
        nodeIds : [
            [0] : <link-1>
            [1] : <link-7>
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
        ]
    }
    [3] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/universe.html
        }
        nodeIds : [
            [0] : <link-3>
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
    [4] : {
        key : {
            action : Prerender
            loaderId : <string>
            url : http://127.0.0.1:8000/space.html
        }
        nodeIds : [
            [0] : <link-2>
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
    [5] : {
        key : {
            action : Prerender
            loaderId : <string>
            url : http://127.0.0.1:8000/time.html
        }
        nodeIds : [
            [0] : <link-1>
        ]
        ruleSetIds : [
            [0] : <rule-set-2>
        ]
    }
]

Running test: duplicateRuleSets
Tests that Preload.preloadingAttemptSourcesUpdated de-duplicates node ids when there are two identical rule sets.
Preload attempts: [
    [0] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/bar.html
        }
        nodeIds : [
            [0] : <link-2>
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
            [1] : <rule-set-2>
        ]
    }
    [1] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : http://127.0.0.1:8000/foo.html
        }
        nodeIds : [
            [0] : <link-1>
        ]
        ruleSetIds : [
            [0] : <rule-set-1>
            [1] : <rule-set-2>
        ]
    }
]

Running test: dynamicUpdate
Tests that Preload.preloadingAttemptSourcesUpdated is dynamic.
Preloading attempts: [
]
Preloading attempts (after DOM mutation): [
    [0] : {
        key : {
            action : Prefetch
            loaderId : <string>
            url : https://foo.com/bar.html
        }
        nodeIds : <object>
        ruleSetIds : <object>
    }
]

Running test: loaderId
Tests that Preload.preloadingAttemptSourcesUpdated uses the correct loaderId.
preloadingAttemptSourcesUpdated: {
    loaderId : <loader-1>
    preloadingAttemptSources : [
        [0] : {
            key : {
                action : Prefetch
                loaderId : <loader-1>
                url : http://127.0.0.1:8000/next.html
            }
            nodeIds : [
            ]
            ruleSetIds : [
                [0] : <rule-set-1>
            ]
        }
    ]
}
preloadingAttemptSourcesUpdated: {
    loaderId : <loader-2>
    preloadingAttemptSources : [
        [0] : {
            key : {
                action : Prefetch
                loaderId : <loader-2>
                url : http://127.0.0.1:8000/prev.html
            }
            nodeIds : [
            ]
            ruleSetIds : [
                [0] : <rule-set-2>
            ]
        }
    ]
}
preloadingAttemptSourcesUpdated: {
    loaderId : <loader-2>
    preloadingAttemptSources : [
    ]
}