https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 48db975c5af44506aa2cd16c7f9693112f82ae1e authored by Michael[tm] Smith on 12 March 2014, 14:58:15 UTC
Use /resources/WebIDLParser.js
Tip revision: 48db975
WorkerLocation_search_fragment.htm
<!DOCTYPE html>
<html>
<head>
<title> WorkerLocation.search with &lt;fragment&gt; in &lt;query&gt; </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>
    
    var FileName = './support/WorkerLocation.js';
    var SearchString = "?test#";
    var ExpectedResult = "?test";
    var description = "WorkerLocation.search - The (empty) &lt;fragment&gt; component is not part of "
                    + "the &lt;query&gt; component for input URL 'http://example.com/?test#'";
    
    var t = async_test("Test Description: " + description);
                  
    var worker = new Worker(FileName + SearchString);

    worker.onmessage = t.step_func(function(evt)
    {
        assert_equals(evt.data.search, ExpectedResult);
        t.done();
    });
</script>
</body>
</html>
back to top