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

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

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 | Annotate | Revision Log
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 chrome.test.getConfig(function(config) { 5 chrome.test.getConfig(function(config) {
6 var LOCAL_URL = 'local-iframe.html'; 6 var LOCAL_URL = 'local-iframe.html';
7 var DATA_URL = 'data:text/plain,This frame should be displayed.'; 7 var DATA_URL = 'data:text/plain,This frame should be displayed.';
8 var REMOTE_URL = 'http://localhost:' + config.testServer.port 8 var REMOTE_URL = 'http://localhost:' + config.testServer.port
9 '/files/extensions/platform_apps/iframes/remote-iframe.html'; 9 '/extensions/platform_apps/iframes/remote-iframe.html';
10 10
11 chrome.test.runTests([ 11 chrome.test.runTests([
12 function localIframe() { 12 function localIframe() {
13 var iframe = document.createElement('iframe'); 13 var iframe = document.createElement('iframe');
14 iframe.onload = chrome.test.callbackPass(function() { 14 iframe.onload = chrome.test.callbackPass(function() {
15 console.log('Local iframe loaded'); 15 console.log('Local iframe loaded');
16 }); 16 });
17 iframe.src = LOCAL_URL; 17 iframe.src = LOCAL_URL;
18 document.body.appendChild(iframe); 18 document.body.appendChild(iframe);
19 }, 19 },
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 }; 76 };
77 iframe.src = REMOTE_URL; 77 iframe.src = REMOTE_URL;
78 document.body.appendChild(iframe); 78 document.body.appendChild(iframe);
79 79
80 // Load failure should happen synchronously, but wait a bit before 80 // Load failure should happen synchronously, but wait a bit before
81 // declaring success. 81 // declaring success.
82 setTimeout(chrome.test.succeed, 500); 82 setTimeout(chrome.test.succeed, 500);
83 } 83 }
84 ]); 84 ]);
85 }); 85 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698