function complexLoadFiltered() {
    expect(
      [  // events
        { label: "a-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            frameUrl: getURL("complexLoad/a.html"),
            initiator: getDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "b-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            // As we do not listed to sub-frames we do not know the frameUrl.
            frameUrl: "unknown frame URL",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getDomain(initiators.BROWSER_INITIATED)
            // Request to chrome-extension:// url has no IP.
          }
        },
        { label: "b-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
            // Request to chrome-extension:// url has no IP.
          }
        },
        { label: "a-onCompleted",
          event: "onCompleted",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getDomain(initiators.BROWSER_INITIATED)
            // Request to chrome-extension:// url has no IP.
          }
        },
        { label: "b-onCompleted",
          event: "onCompleted",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
            // Request to chrome-extension:// url has no IP.
          }
        },
      ],
      [  // event order
        ["a-onBeforeRequest", "a-onResponseStarted",
         "b-onBeforeRequest", "b-onResponseStarted"],
        ["a-onResponseStarted", "a-onCompleted"],
        ["b-onResponseStarted", "b-onCompleted"] ],
      {  // filters
        urls: [getURL("complexLoad/*")],
        types: ["main_frame", "image"],
        tabId: tabId
      });
    chrome.tabs.create({ url: getURL("simpleLoad/a.html") },
        function(newTab) {
      chrome.tabs.remove(newTab.id);
      navigateAndWait(getURL("complexLoad/a.html"));
    });
  }
// and image due to the filter.
and image due to the filter.
and image due to the filter .
function complexLoadFiltered() {
    expect(
      [  
        { label: "a-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            frameUrl: getURL("complexLoad/a.html"),
            initiator: getDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "b-onBeforeRequest",
          event: "onBeforeRequest",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            frameUrl: "unknown frame URL",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "b-onResponseStarted",
          event: "onResponseStarted",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
          }
        },
        { label: "a-onCompleted",
          event: "onCompleted",
          details: {
            type: "main_frame",
            url: getURL("complexLoad/a.html"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            initiator: getDomain(initiators.BROWSER_INITIATED)
          }
        },
        { label: "b-onCompleted",
          event: "onCompleted",
          details: {
            type: "image",
            url: getURL("complexLoad/b.jpg"),
            fromCache: false,
            statusCode: 200,
            statusLine: "HTTP/1.1 200 OK",
            frameId: 1,
            parentFrameId: 0,
            initiator: getDomain(initiators.WEB_INITIATED)
          }
        },
      ],
      [  
        ["a-onBeforeRequest", "a-onResponseStarted",
         "b-onBeforeRequest", "b-onResponseStarted"],
        ["a-onResponseStarted", "a-onCompleted"],
        ["b-onResponseStarted", "b-onCompleted"] ],
      {  
        urls: [getURL("complexLoad/*")],
        types: ["main_frame", "image"],
        tabId: tabId
      });
    chrome.tabs.create({ url: getURL("simpleLoad/a.html") },
        function(newTab) {
      chrome.tabs.remove(newTab.id);
      navigateAndWait(getURL("complexLoad/a.html"));
    });
  }
function complexLoadFiltered ( ) { expect ( [ { label : "a-onBeforeRequest" , event : "onBeforeRequest" , details : { type : "main_frame" , url : getURL ( "complexLoad/a.html" ) , frameUrl : getURL ( "complexLoad/a.html" ) , initiator : getDomain ( initiators . BROWSER_INITIATED ) } } , { label : "b-onBeforeRequest" , event : "onBeforeRequest" , details : { type : "image" , url : getURL ( "complexLoad/b.jpg" ) , frameUrl : "unknown frame URL" , frameId : 1 , parentFrameId : 0 , initiator : getDomain ( initiators . WEB_INITIATED ) } } , { label : "a-onResponseStarted" , event : "onResponseStarted" , details : { type : "main_frame" , url : getURL ( "complexLoad/a.html" ) , fromCache : false , statusCode : 200 , statusLine : "HTTP/1.1 200 OK" , initiator : getDomain ( initiators . BROWSER_INITIATED ) } } , { label : "b-onResponseStarted" , event : "onResponseStarted" , details : { type : "image" , url : getURL ( "complexLoad/b.jpg" ) , fromCache : false , statusCode : 200 , statusLine : "HTTP/1.1 200 OK" , frameId : 1 , parentFrameId : 0 , initiator : getDomain ( initiators . WEB_INITIATED ) } } , { label : "a-onCompleted" , event : "onCompleted" , details : { type : "main_frame" , url : getURL ( "complexLoad/a.html" ) , fromCache : false , statusCode : 200 , statusLine : "HTTP/1.1 200 OK" , initiator : getDomain ( initiators . BROWSER_INITIATED ) } } , { label : "b-onCompleted" , event : "onCompleted" , details : { type : "image" , url : getURL ( "complexLoad/b.jpg" ) , fromCache : false , statusCode : 200 , statusLine : "HTTP/1.1 200 OK" , frameId : 1 , parentFrameId : 0 , initiator : getDomain ( initiators . WEB_INITIATED ) } } , ] , [ [ "a-onBeforeRequest" , "a-onResponseStarted" , "b-onBeforeRequest" , "b-onResponseStarted" ] , [ "a-onResponseStarted" , "a-onCompleted" ] , [ "b-onResponseStarted" , "b-onCompleted" ] ] , { urls : [ getURL ( "complexLoad/*" ) ] , types : [ "main_frame" , "image" ] , tabId : tabId } ) ; chrome . tabs . create ( { url : getURL ( "simpleLoad/a.html" ) } , function ( newTab ) { chrome . tabs . remove ( newTab . id ) ; navigateAndWait ( getURL ( "complexLoad/a.html" ) ) ; } ) ; }
and image due to the filter.
and image due to the filter .
// events // As we do not listed to sub-frames we do not know the frameUrl. // Request to chrome-extension:// url has no IP. // Request to chrome-extension:// url has no IP. // Request to chrome-extension:// url has no IP. // Request to chrome-extension:// url has no IP. // event order // filters