function xhrLoad() {
    expect(
      [  // events
        { label: "onBeforeRequest-1",
          event: "onBeforeRequest",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onBeforeSendHeaders-1",
          event: "onBeforeSendHeaders",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onSendHeaders-1",
          event: "onSendHeaders",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onHeadersReceived-1",
          event: "onHeadersReceived",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onResponseStarted-1",
          event: "onResponseStarted",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onCompleted-1",
          event: "onCompleted",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "a.js-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onBeforeSendHeaders",
          event: "onBeforeSendHeaders",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onSendHeaders",
          event: "onSendHeaders",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onHeadersReceived",
          event: "onHeadersReceived",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onCompleted",
          event: "onCompleted",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onBeforeRequest-2",
          event: "onBeforeRequest",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onBeforeSendHeaders-2",
          event: "onBeforeSendHeaders",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onSendHeaders-2",
          event: "onSendHeaders",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onHeadersReceived-2",
          event: "onHeadersReceived",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onResponseStarted-2",
          event: "onResponseStarted",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onCompleted-2",
          event: "onCompleted",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        }
      ],
      [  // event order
        ["onBeforeRequest-1", "onBeforeSendHeaders-1", "onSendHeaders-1",
         "onHeadersReceived-1", "onResponseStarted-1", "onCompleted-1",
         "onBeforeRequest-2", "onBeforeSendHeaders-2", "onSendHeaders-2",
         "onHeadersReceived-2", "onResponseStarted-2", "onCompleted-2"] ]);
    navigateAndWait(getURLHttpXHR());
  }
// Navigates to a page to generates an XHR.
Navigates to a page to generates an XHR.
Navigates to a page to generates an XHR .
function xhrLoad() {
    expect(
      [  
        { label: "onBeforeRequest-1",
          event: "onBeforeRequest",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onBeforeSendHeaders-1",
          event: "onBeforeSendHeaders",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onSendHeaders-1",
          event: "onSendHeaders",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onHeadersReceived-1",
          event: "onHeadersReceived",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onResponseStarted-1",
          event: "onResponseStarted",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "onCompleted-1",
          event: "onCompleted",
          details: {
            type: "main_frame",
            url: getURLHttpXHR(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "a.js-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onBeforeSendHeaders",
          event: "onBeforeSendHeaders",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onSendHeaders",
          event: "onSendHeaders",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onHeadersReceived",
          event: "onHeadersReceived",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a.js-onCompleted",
          event: "onCompleted",
          details: {
            type: "script",
            url: getURLHttpXHRJavaScript(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onBeforeRequest-2",
          event: "onBeforeRequest",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            frameUrl: getURLHttpXHR(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onBeforeSendHeaders-2",
          event: "onBeforeSendHeaders",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onSendHeaders-2",
          event: "onSendHeaders",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onHeadersReceived-2",
          event: "onHeadersReceived",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusLine: "HTTP/1.1 200 OK",
            statusCode: 200,
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onResponseStarted-2",
          event: "onResponseStarted",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "onCompleted-2",
          event: "onCompleted",
          details: {
            type: "xmlhttprequest",
            url: getURLHttpXHRData(),
            statusCode: 200,
            ip: "127.0.0.1",
            fromCache: false,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getServerDomain(initiators.WEB_INITIATED)
          }
        }
      ],
      [  
        ["onBeforeRequest-1", "onBeforeSendHeaders-1", "onSendHeaders-1",
         "onHeadersReceived-1", "onResponseStarted-1", "onCompleted-1",
         "onBeforeRequest-2", "onBeforeSendHeaders-2", "onSendHeaders-2",
         "onHeadersReceived-2", "onResponseStarted-2", "onCompleted-2"] ]);
    navigateAndWait(getURLHttpXHR());
  }
function xhrLoad ( ) { expect ( [ { label : "onBeforeRequest-1" , event : "onBeforeRequest" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , frameUrl : getURLHttpXHR ( ) , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "onBeforeSendHeaders-1" , event : "onBeforeSendHeaders" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "onSendHeaders-1" , event : "onSendHeaders" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "onHeadersReceived-1" , event : "onHeadersReceived" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , statusLine : "HTTP/1.1 200 OK" , statusCode : 200 , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "onResponseStarted-1" , event : "onResponseStarted" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "onCompleted-1" , event : "onCompleted" , details : { type : "main_frame" , url : getURLHttpXHR ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . BROWSER_INITIATED ) } } , { label : "a.js-onBeforeRequest" , event : "onBeforeRequest" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , frameUrl : getURLHttpXHR ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "a.js-onBeforeSendHeaders" , event : "onBeforeSendHeaders" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "a.js-onSendHeaders" , event : "onSendHeaders" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "a.js-onHeadersReceived" , event : "onHeadersReceived" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , statusLine : "HTTP/1.1 200 OK" , statusCode : 200 , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "a.js-onResponseStarted" , event : "onResponseStarted" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "a.js-onCompleted" , event : "onCompleted" , details : { type : "script" , url : getURLHttpXHRJavaScript ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onBeforeRequest-2" , event : "onBeforeRequest" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , frameUrl : getURLHttpXHR ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onBeforeSendHeaders-2" , event : "onBeforeSendHeaders" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onSendHeaders-2" , event : "onSendHeaders" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onHeadersReceived-2" , event : "onHeadersReceived" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , statusLine : "HTTP/1.1 200 OK" , statusCode : 200 , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onResponseStarted-2" , event : "onResponseStarted" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } , { label : "onCompleted-2" , event : "onCompleted" , details : { type : "xmlhttprequest" , url : getURLHttpXHRData ( ) , statusCode : 200 , ip : "127.0.0.1" , fromCache : false , statusLine : "HTTP/1.1 200 OK" , initiator : getServerDomain ( initiators . WEB_INITIATED ) } } ] , [ [ "onBeforeRequest-1" , "onBeforeSendHeaders-1" , "onSendHeaders-1" , "onHeadersReceived-1" , "onResponseStarted-1" , "onCompleted-1" , "onBeforeRequest-2" , "onBeforeSendHeaders-2" , "onSendHeaders-2" , "onHeadersReceived-2" , "onResponseStarted-2" , "onCompleted-2" ] ] ) ; navigateAndWait ( getURLHttpXHR ( ) ) ; }
Navigates to a page to generates an XHR.
Navigates to a page to generates an XHR .
// events // event order