OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var util = {}; | 5 var util = {}; |
6 | 6 |
7 // Creates a <webview> tag in document.body and returns the reference to it. | 7 // Creates a <webview> tag in document.body and returns the reference to it. |
8 // It also sets a dummy src. The dummy src is significant because this makes | 8 // It also sets a dummy src. The dummy src is significant because this makes |
9 // sure that the <object> shim is created (asynchronously at this point) for the | 9 // sure that the <object> shim is created (asynchronously at this point) for the |
10 // <webview> tag. This makes the <webview> tag ready for add/removeEventListener | 10 // <webview> tag. This makes the <webview> tag ready for add/removeEventListener |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 chrome.test.assertEq(1, results.length); | 216 chrome.test.assertEq(1, results.length); |
217 chrome.test.assertEq('red', results[0]); | 217 chrome.test.assertEq('red', results[0]); |
218 chrome.test.succeed(); | 218 chrome.test.succeed(); |
219 }); | 219 }); |
220 }); | 220 }); |
221 webview.setAttribute('src', 'data:text/html,trigger navigation'); | 221 webview.setAttribute('src', 'data:text/html,trigger navigation'); |
222 document.body.appendChild(webview); | 222 document.body.appendChild(webview); |
223 } | 223 } |
224 ]); | 224 ]); |
225 }; | 225 }; |
OLD | NEW |