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

Side by Side Diff: chrome/test/data/extensions/api_test/background_scripts/b.js

Issue 9150008: Introduce background.scripts feature for extension manifests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready to land Created 8 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 // We're just testing that multiple scripts get added to a page in-order
6 // and are run.
7 chrome.test.assertEq("hi!", test);
8
9 // Also test the injection point is consistent. We want to inject into body
10 // because having a document.body element is convenient for some scripts.
11 var scripts = document.querySelectorAll("script");
12 chrome.test.assertEq(2, scripts.length);
13 for (var i = 0, script; script = scripts[i]; i++) {
14 chrome.test.assertEq("BODY", script.parentElement.nodeName);
15 }
16
17 chrome.test.notifyPass();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698