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

Side by Side Diff: chrome/test/data/extensions/api_test/content_scripts/dont_match_host_permissions/background.html

Issue 8725019: Move another bunch of extension API tests to manifest_version 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 <script> 1 <!--
2 var receivedRequests = {}; 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 3 * source code is governed by a BSD-style license that can be found in the
4 chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { 4 * LICENSE file.
5 if (receivedRequests[request.source]) { 5 -->
6 chrome.test.fail( 6 <script src="background.js"></script>
7 'Received multiple requests from "' + request.source + '".');
8 return;
9 }
10
11 chrome.test.assertEq(request.source == 'a.com', request.modified);
12 receivedRequests[request.source] = true;
13 if (receivedRequests['a.com'] && receivedRequests['b.com'])
14 chrome.test.succeed();
15 });
16
17 // We load two pages. On a.com, both our modify and test script will run and we
18 // will receive a request that says that the page was modified. On b.com, only
19 // the test script will run, and the request will say that the page was not
20 // modified.
21 chrome.test.getConfig(function(config) {
22 chrome.tabs.create({
23 url: 'http://a.com:' + config.testServer.port +
24 '/files/extensions/test_file.html'});
25 chrome.tabs.create({
26 url: 'http://b.com:' + config.testServer.port +
27 '/files/extensions/test_file.html'});
28 });
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698