Bug 771224 - use chrome:// instead of loading remote xul. r=jgriffin

This commit is contained in:
Malini Das 2012-07-12 11:01:20 -04:00
Родитель 4dfabffcbe
Коммит 0647850ec7
13 изменённых файлов: 19 добавлений и 46 удалений

Просмотреть файл

@ -15,4 +15,8 @@ ifdef ENABLE_MARIONETTE
$(NULL)
endif
ifdef ENABLE_TESTS
DEFINES += -DENABLE_TESTS
endif
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -16,6 +16,6 @@
<textbox id="textInput3" class="asdf" size="6" value="test" label="input" />
</vbox>
<iframe id="iframe" name="iframename" src="test2.xul"/>
<iframe id="iframe" name="iframename" src="test_nested_iframe.xul"/>
<iframe id="iframe" name="iframename" src="chrome://marionette/content/test2.xul"/>
<iframe id="iframe" name="iframename" src="chrome://marionette/content/test_nested_iframe.xul"/>
</dialog>

Просмотреть файл

@ -20,8 +20,7 @@ class GeckoInstance(object):
def start(self):
profile = self.profile
if not profile:
prefs = {"dom.allow_XUL_XBL_for_file": True,
"marionette.defaultPrefs.enabled": True,
prefs = {"marionette.defaultPrefs.enabled": True,
"marionette.defaultPrefs.port": 2828}
profile = {"preferences": prefs, "restore":False}
print "starting runner"

Просмотреть файл

@ -24,12 +24,7 @@ class TestClickChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -27,12 +27,7 @@ class TestStateChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -128,12 +128,7 @@ class TestElementsChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -17,12 +17,7 @@ class TestGetAttributeChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -19,12 +19,7 @@ class TestSelectedChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -37,12 +37,7 @@ class TestSwitchFrameChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -33,12 +33,7 @@ class TestTextChrome(MarionetteTestCase):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.get_window()
#need to get the file:// path for xul
unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
tests = os.path.abspath(os.path.join(unit, os.path.pardir))
mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
xul = "file://" + os.path.join(mpath, "www", "test.xul")
self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');")
def tearDown(self):
self.marionette.execute_script("window.close();")

Просмотреть файл

@ -12,6 +12,11 @@ marionette.jar:
content/marionette-perf.js (marionette-perf.js)
content/EventUtils.js (EventUtils.js)
content/ChromeUtils.js (ChromeUtils.js)
#ifdef ENABLE_TESTS
content/test.xul (client/marionette/chrome/test.xul)
content/test2.xul (client/marionette/chrome/test2.xul)
content/test_nested_iframe.xul (client/marionette/chrome/test_nested_iframe.xul)
#endif
% content specialpowers %content/
content/specialpowers.js (../mochitest/specialpowers/content/specialpowers.js)