зеркало из https://github.com/mozilla/gecko-dev.git
Bug 977899: Have Marionette navigate the top frame on desktop when `navigate()`
is called. r=ato This means that we are now doing step 7 in http://w3c.github.io/webdriver/webdriver-spec.html#get --HG-- extra : commitid : KQi5f9c0C1r extra : rebase_source : 9c77a1d9aadf529ddbae2d32e0e1f9c4d532e181 extra : histedit_source : f40f377e1398f72fa68efd69ad864d9e4ae7e2b4
This commit is contained in:
Родитель
ef98cfc55b
Коммит
ea7d4b9e69
|
@ -124,3 +124,13 @@ class TestSwitchFrame(MarionetteTestCase):
|
|||
def test_switch_to_frame_with_negative_index(self):
|
||||
self.marionette.navigate(self.marionette.absolute_url("test_iframe.html"))
|
||||
self.assertRaises(NoSuchFrameException, self.marionette.switch_to_frame, -1)
|
||||
|
||||
def test_after_switching_to_child_frame_navigates_changes_top(self):
|
||||
frame_html = self.marionette.absolute_url("frameset.html")
|
||||
self.marionette.navigate(frame_html)
|
||||
frame = self.marionette.find_element("name", "third")
|
||||
self.marionette.switch_to_frame(frame)
|
||||
self.assertEqual("Unique title", self.marionette.title)
|
||||
test_html = self.marionette.absolute_url("test.html")
|
||||
self.marionette.navigate(test_html)
|
||||
self.assertEqual("Marionette Test", self.marionette.title)
|
||||
|
|
|
@ -1325,7 +1325,15 @@ function get(msg) {
|
|||
navTimer.initWithCallback(timerFunc, msg.json.pageTimeout, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
addEventListener("DOMContentLoaded", onDOMContentLoaded, false);
|
||||
if (isB2G) {
|
||||
curContainer.frame.location = msg.json.url;
|
||||
} else {
|
||||
// We need to move to the top frame before navigating
|
||||
sendSyncMessage("Marionette:switchedToFrame", { frameValue: null });
|
||||
curContainer.frame = content;
|
||||
|
||||
curContainer.frame.location = msg.json.url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче