https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 8e313975c739ba7c32a03927a13664e5595fdc12 authored by Ryosuke Niwa on 26 November 2013, 07:14:14 UTC
Fix tests for parsing template elements inside XHTML documents.
Tip revision: 8e31397
support.js
// For ignoring exception names (just for testing)
/*
_real_assert_throws = assert_throws;
function assert_throws(d, func, desc) {
    try {
        func();
    } catch(e) {
        return true;
    }
    assert_unreached("Didn't throw!");
}
*/

function dirname(path) {
    return path.replace(/\/[^\/]*$/, '/')
}

/* This subdomain should point to this same location */
var SUBDOMAIN = 'www1'
var SUBDOMAIN2 = 'www2'
var PORT = '81'
var PORTS = '83' // w3c actually has no 'alternate' https port

/* Changes http://example.com/abc/def/cool.htm to http://www1.example.com/abc/def/ */
var CROSSDOMAIN     = dirname(location.href)
                        .replace('://', '://' + SUBDOMAIN + '.')
var REMOTE_HOST     = SUBDOMAIN + '.' + location.host
var REMOTE_PROTOCOL = location.protocol
var REMOTE_ORIGIN   = REMOTE_PROTOCOL + '//' + REMOTE_HOST
back to top