Chromium Code Reviews| 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 var embedder = {}; | 6 var embedder = {}; |
| 7 embedder.baseGuestURL = ''; | 7 embedder.baseGuestURL = ''; |
| 8 embedder.emptyGuestURL = ''; | 8 embedder.emptyGuestURL = ''; |
| 9 embedder.windowOpenGuestURL = ''; | 9 embedder.windowOpenGuestURL = ''; |
| 10 embedder.noReferrerGuestURL = ''; | 10 embedder.noReferrerGuestURL = ''; |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 904 embedder.test.fail(); | 904 embedder.test.fail(); |
| 905 } | 905 } |
| 906 }); | 906 }); |
| 907 webview.setAttribute('src', embedder.windowOpenGuestURL); | 907 webview.setAttribute('src', embedder.windowOpenGuestURL); |
| 908 document.body.appendChild(webview); | 908 document.body.appendChild(webview); |
| 909 } | 909 } |
| 910 | 910 |
| 911 function testNewWindowNoReferrerLink() { | 911 function testNewWindowNoReferrerLink() { |
| 912 var webview = document.createElement('webview'); | 912 var webview = document.createElement('webview'); |
| 913 webview.addEventListener('newwindow', function(e) { | 913 webview.addEventListener('newwindow', function(e) { |
| 914 window.console.log('new window call'); | |
|
lazyboy
2014/05/12 23:00:20
Remove
Fady Samuel
2014/05/13 18:59:02
Done.
| |
| 914 e.preventDefault(); | 915 e.preventDefault(); |
| 915 var newwebview = document.createElement('webview'); | 916 var newwebview = document.createElement('webview'); |
| 916 newwebview.addEventListener('loadstop', function(evt) { | 917 newwebview.addEventListener('loadstop', function(evt) { |
| 917 // If the new window finishes loading, the test is successful. | 918 // If the new window finishes loading, the test is successful. |
| 918 embedder.test.succeed(); | 919 embedder.test.succeed(); |
| 919 }); | 920 }); |
| 920 document.body.appendChild(newwebview); | 921 document.body.appendChild(newwebview); |
| 921 // Attach the new window to the new <webview>. | 922 // Attach the new window to the new <webview>. |
| 922 e.window.attach(newwebview); | 923 e.window.attach(newwebview); |
| 923 }); | 924 }); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1573 'testFindAPI': testFindAPI, | 1574 'testFindAPI': testFindAPI, |
| 1574 'testFindAPI_findupdate': testFindAPI | 1575 'testFindAPI_findupdate': testFindAPI |
| 1575 }; | 1576 }; |
| 1576 | 1577 |
| 1577 onload = function() { | 1578 onload = function() { |
| 1578 chrome.test.getConfig(function(config) { | 1579 chrome.test.getConfig(function(config) { |
| 1579 embedder.setUp_(config); | 1580 embedder.setUp_(config); |
| 1580 chrome.test.sendMessage("Launched"); | 1581 chrome.test.sendMessage("Launched"); |
| 1581 }); | 1582 }); |
| 1582 }; | 1583 }; |
| OLD | NEW |