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

Side by Side Diff: chrome/test/data/extensions/api_test/content_scripts/view_source/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 chrome.test.runTests([ 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 function noContentScriptsInViewSource() { 3 * source code is governed by a BSD-style license that can be found in the
4 4 * LICENSE file.
5 chrome.extension.onRequest.addListener( 5 -->
6 function(request, sender, sendResponse) { 6 <script src="background.js"></script>
7 chrome.test.fail('Got a content script request from view source mode.');
8 });
9
10 // We rely on content scripts running at document_start to run before we
11 // receive a tab update with 'complete' status.
12
13 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
14 if (changeInfo.status === 'complete' &&
15 tab.url.indexOf('test_file.html') != -1) {
16 chrome.test.succeed();
17 }
18 });
19
20 chrome.test.getConfig(function(config) {
21 chrome.tabs.create({
22 url: 'view-source:http://localhost:' + config.testServer.port +
23 '/files/extensions/test_file.html'});
24 });
25 }
26 ]);
27
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698