1# Copyright 2016 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 5import os 6 7 8def InjectJavaScript(tab, jsFileName): 9 with open(os.path.join(os.path.dirname(__file__), jsFileName)) as f: 10 js = f.read() 11 tab.ExecuteJavaScript(js) 12