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.
5 document.write('<div id="hi">hello</div>');
7 document.getElementById('hi').innerHTML = 'innerhtml';
9 document.createElement('script');
10 document.createElement('iframe');
11 document.createElement('div');
12 document.createElement('a');
13 document.createElement('input');
14 document.createElement('embed');
15 document.createElement('object');
17 var endConditions = {};
18 endConditions['http://www.google.com/'] = true;
19 endConditions['http://www.google.com/?q=a'] = true;
20 endConditions['http://www.google.com/?q=b'] = true;
21 endConditions['http://www.cnn.com/?q=a'] = true;
22 endConditions['http://www.cnn.com/?q=b'] = true;
24 var doubleEndConditions = {};
25 doubleEndConditions['http://www.google.com/?p=a'] = true;
26 doubleEndConditions['http://www.google.com/?p=b'] = true;
27 doubleEndConditions['http://www.cnn.com/#a'] = true;
28 doubleEndConditions['http://www.cnn.com/#b'] = true;
29 doubleEndConditions['http://www.google.com/#a'] = true;
30 doubleEndConditions['http://www.google.com/#b'] = true;
32 if (document.location in endConditions) {
33 chrome.runtime.sendMessage({testType: 'single'}, function(response) {});
34 } else if (document.location in doubleEndConditions) {
35 chrome.runtime.sendMessage({testType: 'double'}, function(response) {});