1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 var allComplete = false;
9 chrome.runtime.onMessage.addListener(
10 function(request, sender, sendResponse) {
11 if (request['testType'] == 'single') {
13 } else if (request['testType'] == 'double') {
20 chrome.tabs.query({url: 'http://www.blocker.com/'}, function(tabs) {
21 chrome.tabs.update(tabs[0]['id'], {url: 'http://www.done.com'});
27 chrome.tabs.onUpdated.addListener(
28 function(tabid, changeinfo, tab) {
29 if (done && !allComplete) {
30 if (changeinfo.url == 'http://www.blocker.com/') {
31 chrome.tabs.update(tabid, {url: 'http://www.done.com'});