function redirectIsBlocked() {
    var targetUrl = getURL('res/a.html');
    var redirectUrl = getURL('res/b.html');
    var expectUrl = getURL('');
    expect(
      [
        { label: 'onBeforeRequest',
          event: 'onBeforeRequest',
          details: {
            type: 'main_frame',
            url: expectUrl,
            frameUrl: expectUrl
          },
          retval: {redirectUrl: redirectUrl}
        },
        { label: 'onResponseStarted',
          event: 'onResponseStarted',
          details: {
            frameId: 0,
            fromCache: false,
            method: 'GET',
            parentFrameId: -1,
            statusCode: 200,
            statusLine: 'HTTP/1.1 200 OK',
            tabId: 0,
            type: 'main_frame',
            url: expectUrl
          }
        },
        { label: 'onCompleted',
          event: 'onCompleted',
          details: {
            frameId: 0,
            fromCache: false,
            method: 'GET',
            parentFrameId: -1,
            statusCode: 200,
            statusLine: 'HTTP/1.1 200 OK',
            tabId: 0,
            type: 'main_frame',
            url: expectUrl
          }
        },
      ],
      [['onBeforeRequest', 'onResponseStarted', 'onCompleted']],
      {urls: ['<all_urls>']},
      ['blocking']);
      navigateAndWait(targetUrl);
  }
// origin because it doesn't rely on the URL for the check.
origin because it doesn't rely on the URL for the check.
origin because it doesn ' t rely on the URL for the check .
function redirectIsBlocked() {
    var targetUrl = getURL('res/a.html');
    var redirectUrl = getURL('res/b.html');
    var expectUrl = getURL('');
    expect(
      [
        { label: 'onBeforeRequest',
          event: 'onBeforeRequest',
          details: {
            type: 'main_frame',
            url: expectUrl,
            frameUrl: expectUrl
          },
          retval: {redirectUrl: redirectUrl}
        },
        { label: 'onResponseStarted',
          event: 'onResponseStarted',
          details: {
            frameId: 0,
            fromCache: false,
            method: 'GET',
            parentFrameId: -1,
            statusCode: 200,
            statusLine: 'HTTP/1.1 200 OK',
            tabId: 0,
            type: 'main_frame',
            url: expectUrl
          }
        },
        { label: 'onCompleted',
          event: 'onCompleted',
          details: {
            frameId: 0,
            fromCache: false,
            method: 'GET',
            parentFrameId: -1,
            statusCode: 200,
            statusLine: 'HTTP/1.1 200 OK',
            tabId: 0,
            type: 'main_frame',
            url: expectUrl
          }
        },
      ],
      [['onBeforeRequest', 'onResponseStarted', 'onCompleted']],
      {urls: ['<all_urls>']},
      ['blocking']);
      navigateAndWait(targetUrl);
  }
function redirectIsBlocked ( ) { var targetUrl = getURL ( 'res/a.html' ) ; var redirectUrl = getURL ( 'res/b.html' ) ; var expectUrl = getURL ( '' ) ; expect ( [ { label : 'onBeforeRequest' , event : 'onBeforeRequest' , details : { type : 'main_frame' , url : expectUrl , frameUrl : expectUrl } , retval : { redirectUrl : redirectUrl } } , { label : 'onResponseStarted' , event : 'onResponseStarted' , details : { frameId : 0 , fromCache : false , method : 'GET' , parentFrameId : - 1 , statusCode : 200 , statusLine : 'HTTP/1.1 200 OK' , tabId : 0 , type : 'main_frame' , url : expectUrl } } , { label : 'onCompleted' , event : 'onCompleted' , details : { frameId : 0 , fromCache : false , method : 'GET' , parentFrameId : - 1 , statusCode : 200 , statusLine : 'HTTP/1.1 200 OK' , tabId : 0 , type : 'main_frame' , url : expectUrl } } , ] , [ [ 'onBeforeRequest' , 'onResponseStarted' , 'onCompleted' ] ] , { urls : [ '<all_urls>' ] } , [ 'blocking' ] ) ; navigateAndWait ( targetUrl ) ; }
origin because it doesn't rely on the URL for the check.
origin because it doesn ' t rely on the URL for the check .