blob: 6aa502480e2aa4cb1635862a7088adb2f8c3509a [file]
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// We're just testing that multiple scripts get added to a page in-order
// and are run.
chrome.test.assertEq('hi!', test);
// Also test the injection point is consistent. We want to inject into body
// because having a document.body element is convenient for some scripts.
const scripts = document.querySelectorAll('script');
chrome.test.assertEq(2, scripts.length);
for (let i = 0, script; script = scripts[i]; i++) {
chrome.test.assertEq('BODY', script.parentElement.nodeName);
}
chrome.test.notifyPass();