Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1242)

Side by Side Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 190483002: Remove 'writable:false' from webview.request's definition since false is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 embedder.test.assertEq( 379 embedder.test.assertEq(
380 'function', 380 'function',
381 typeof webview.request[apiPropertiesToCheck[i]].addRules); 381 typeof webview.request[apiPropertiesToCheck[i]].addRules);
382 embedder.test.assertEq( 382 embedder.test.assertEq(
383 'function', 383 'function',
384 typeof webview.request[apiPropertiesToCheck[i]].getRules); 384 typeof webview.request[apiPropertiesToCheck[i]].getRules);
385 embedder.test.assertEq( 385 embedder.test.assertEq(
386 'function', 386 'function',
387 typeof webview.request[apiPropertiesToCheck[i]].removeRules); 387 typeof webview.request[apiPropertiesToCheck[i]].removeRules);
388 } 388 }
389
390 // Try to overwrite webview.request, shall not succeed.
391 webview.request = '123';
392 embedder.test.assertTrue(typeof webview.request !== 'string');
393
389 embedder.test.succeed(); 394 embedder.test.succeed();
390 }); 395 });
391 webview.setAttribute('src', 'data:text/html,webview check api'); 396 webview.setAttribute('src', 'data:text/html,webview check api');
392 document.body.appendChild(webview); 397 document.body.appendChild(webview);
393 } 398 }
394 399
395 // This test verifies that the loadstart, loadstop, and exit events fire as 400 // This test verifies that the loadstart, loadstop, and exit events fire as
396 // expected. 401 // expected.
397 function testEventName() { 402 function testEventName() {
398 var webview = document.createElement('webview'); 403 var webview = document.createElement('webview');
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 'testFindAPI': testFindAPI, 1518 'testFindAPI': testFindAPI,
1514 'testFindAPI_findupdate': testFindAPI 1519 'testFindAPI_findupdate': testFindAPI
1515 }; 1520 };
1516 1521
1517 onload = function() { 1522 onload = function() {
1518 chrome.test.getConfig(function(config) { 1523 chrome.test.getConfig(function(config) {
1519 embedder.setUp_(config); 1524 embedder.setUp_(config);
1520 chrome.test.sendMessage("Launched"); 1525 chrome.test.sendMessage("Launched");
1521 }); 1526 });
1522 }; 1527 };
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698