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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 'onRequest', | 506 'onRequest', |
507 // WebRequest API. | 507 // WebRequest API. |
508 'onBeforeRequest', | 508 'onBeforeRequest', |
509 'onBeforeSendHeaders', | 509 'onBeforeSendHeaders', |
510 'onSendHeaders', | 510 'onSendHeaders', |
511 'onHeadersReceived', | 511 'onHeadersReceived', |
512 'onAuthRequired', | 512 'onAuthRequired', |
513 'onBeforeRedirect', | 513 'onBeforeRedirect', |
514 'onResponseStarted', | 514 'onResponseStarted', |
515 'onCompleted', | 515 'onCompleted', |
516 'onErrorOccurred' | 516 'onErrorOccurred', |
| 517 // Declarative Content API. |
| 518 'onPageChanged' |
517 ]; | 519 ]; |
518 var webview = document.createElement('webview'); | 520 var webview = document.createElement('webview'); |
519 webview.setAttribute('partition', arguments.callee.name); | 521 webview.setAttribute('partition', arguments.callee.name); |
520 webview.addEventListener('loadstop', function(e) { | 522 webview.addEventListener('loadstop', function(e) { |
521 for (var i = 0; i < apiPropertiesToCheck.length; ++i) { | 523 for (var i = 0; i < apiPropertiesToCheck.length; ++i) { |
522 embedder.test.assertEq('object', | 524 embedder.test.assertEq('object', |
523 typeof webview.request[apiPropertiesToCheck[i]]); | 525 typeof webview.request[apiPropertiesToCheck[i]]); |
524 embedder.test.assertEq( | 526 embedder.test.assertEq( |
525 'function', | 527 'function', |
526 typeof webview.request[apiPropertiesToCheck[i]].addListener); | 528 typeof webview.request[apiPropertiesToCheck[i]].addListener); |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 'testFindAPI_findupdate': testFindAPI, | 2079 'testFindAPI_findupdate': testFindAPI, |
2078 'testLoadDataAPI': testLoadDataAPI | 2080 'testLoadDataAPI': testLoadDataAPI |
2079 }; | 2081 }; |
2080 | 2082 |
2081 onload = function() { | 2083 onload = function() { |
2082 chrome.test.getConfig(function(config) { | 2084 chrome.test.getConfig(function(config) { |
2083 embedder.setUp_(config); | 2085 embedder.setUp_(config); |
2084 chrome.test.sendMessage("Launched"); | 2086 chrome.test.sendMessage("Launched"); |
2085 }); | 2087 }); |
2086 }; | 2088 }; |
OLD | NEW |