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 from telemetry.core import web_contents
6 class ExtensionPage(web_contents.WebContents):
7 """Represents a an extension page in the browser"""
8 def __init__(self, extension_id, url, inspector_backend):
9 super(ExtensionPage, self).__init__(inspector_backend)
10 self.extension_id = extension_id
12 assert url.startswith('chrome-extension://' + extension_id)
15 super(ExtensionPage, self).__del__()
18 """ Reloading an extension page is used as a workaround for an extension
19 binding bug for old versions of Chrome (crbug.com/263162). After Navigate
20 returns, we are guaranteed that the inspected page is in the correct state.
22 self._inspector_backend.Navigate(self.url, None, 10)